I am having doubts in how to configure the web.xml file in eclipse juno.
What i am trying to do is create a servlet that takes in a users name through an html file and print the message "welcome" followed by name.
Now I have created a servlet that takes the input from the html file through getParameter and displays the correct output..i run it by right clicking on the html file and then clicking on the run on server option.
The html file i have named as welcome.html.
in web.xml , the url pattern is /TestApp and the welcome-file i have set to welcome.html so i am expecting when i right click on servlet and use run on server the welcome.html to be displayed first..but welcome null is displayed..which means that the servlet takes control directly please help..
So what i am expecting to happen when i right click on the servlet is to take me to the html file which asks the user for input but instead i am taken to the TestApp directly and it displays Welcome null..
Right click on your project and select run on server. You should see welcome.html, in case you have configured welcome-file-list properly in web.xml.
When you right click on servlet and choose run on server, how do you expect it to present you welcome.html? How come the servlet will know, from where it will get the request? It just invokes the servlet directly..
SCJP 5 (93%)
Joined: Feb 11, 2012
Thank you guys I think i saw somebody right click on the servlet source code and get the welcome.html file..that was what i was trying to do till now..thanks for your help..