executing servlets in apache tomcat
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
how to execute servlets on apache tomcat 4.1.31.....please tell me the steps to be followed
Winners Dont Do Different Things, They Do Things Differently !!!
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Did your version of Tomcat not come with documentation?
deepak borole
Greenhorn
Posts: 25
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
i have copied the class file in
C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples\WEB-INF\classes named HelloWorldExample and hav made entry in the web.xml file as
<servlet>
<servlet-name>HelloWorldExample</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>/HelloWorldExample</url-pattern>
</servlet-mapping>
and executing it as
http://localhost:8080/examples/HelloWorldExample
but gettin the 404 error
C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples\WEB-INF\classes named HelloWorldExample and hav made entry in the web.xml file as
<servlet>
<servlet-name>HelloWorldExample</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>/HelloWorldExample</url-pattern>
</servlet-mapping>
and executing it as
http://localhost:8080/examples/HelloWorldExample
but gettin the 404 error
Winners Dont Do Different Things, They Do Things Differently !!!
posted 19 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Have you checked the Tomcat logs?
Did you get rid of the examples that ship with Tomcat or did you add your servlet to the existing "examples" app?
If you added it, can you still run the other examples?
If not, have you checked the Tomcat logs to see if your addition blew up the app?
I believe that in Servlet Spec 2.3 compliant apps (which Tomcat 4.1 is) the order of elements in the web.xml file is critical.
If you didn't enter them in the correct order, you should see some Sax parse errors in the logs.
This sounds like more of a Tomcat issue than a servlet one.
Moving.
Did you get rid of the examples that ship with Tomcat or did you add your servlet to the existing "examples" app?
If you added it, can you still run the other examples?
If not, have you checked the Tomcat logs to see if your addition blew up the app?
I believe that in Servlet Spec 2.3 compliant apps (which Tomcat 4.1 is) the order of elements in the web.xml file is critical.
If you didn't enter them in the correct order, you should see some Sax parse errors in the logs.
This sounds like more of a Tomcat issue than a servlet one.
Moving.
| When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |













