I’m working on Java Servlets web application. I have a html file “searchPage.html” in the WebContent folder. I have included the “searchPage.html” name in the welcome-file list of web.xml. Now whenever I run the servlet, the searchPage.html is run. The url is
http://localhost:8080/HeadersTest/ .
“HeadersTest” is the name of the web app. Now my question is, I would like to add some parameters in the url following the “HeadersTest”.The parameters shall appear after the web app is run. Do I need to add these parameters in the service methods (doGet, doPost etc.)? For example:
http://localhost:8080/HeadersTest?paramName1=paramValue1¶mName2=paramValue2.
I’m fairly new to servlet. If someone can point me in the right direction, that will be really helpful. I have attached the screenshot of my directory structure of my web application below:
Update: As I have listed the "searchPage.html" in welcome-file list of web.xml, "searchPage.html" launches whenever I run the web application. I would like to add few parameters in the url when the web app launches.
