Hi there,
I am trying to create my first web app
servlet working in a folder- murach.It has an email form, which passes the parameters to a page using servlet. I am using
Tomcat 5.5
I have placed web.xml in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\murach\WEB-INF\classes
I am also using the same web.xml as in the servlets-examples folder in Tomcat 5.5. I have made the following changes to my web.xml in order to get my application working. This hint I got from one of the forum discussions in JavaRanch.
<servlet>
<servlet-name>EmailServlet</servlet-name>
<servlet-class>email5.EmailServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>EmailServlet</servlet-name>
<url-pattern>/servlet/email5/EmailServlet</url-pattern>
</servlet-mapping>
*******
Then, I put the Context tag in server.xml which is in C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf
My Context tag looks like this:
<Context path="/murach"
docBase="C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\murach"
reloadable="true" debug="0"/>
Still, I am not able to run the servlet when I go through the html page, which is :
http://localhost:8080/murach/join_email_list.html The moment I hit SUBMIT button, it shows
http://localhost:8080/servlet/email5.EmailServlet?firstName=kiran&lastName=kumar&emailAddress=kirankumar%40yahoo.com in the address bar and says,
404 -FILE NOT FOUND ERROR
I am not able to figure out why is this showing like this. I would really appreciate if somebody could help me out with this!!
-Thanks