As per your current web.xml definition, you need to give the URL "/WebApp/Servlet1" to access Servlet1.
Since, you gave the welcome page as <servername>/WebApp/jsp/addinfo.jsp, when you submit the page the request URL "<servername>/WebApp/jsp/Servlet1" is constructed and sent to server. Since web.xml is not having any server mapping for the pattern "/jsp/Servlet1", you are getting the 404 response.
This is so confusing. Can someone please help me out and show me what to do?
I'm trying since long and I am new to using IDEs or even Web Applications for that matter. I'm putting up all the details. Please someone show me, what needs to be done.
Here's the place where my servlet is located: C:\Users\Noopur\Studies\WebApp\src\java\proservlet\Servlet1. This is a Java file while the class file is located in WEB-INF.
I made a package named proservlet.
These are the changes I did in my web.xml file.
This are excerpts of my JSP file.
And my servlet is same as above except that now i have kept it under
Someone please give me a exact answer, this is very frustrating. Thank you.
Okay Bear. I told you its confusing me. The context path is the place where I have kept the servlet, right? So the servlet is now in proservlet. I changed the path now and its saying broken link. Can you please give me a direct answer? And help me understand it?