Is deployment descriptor is requestion componet to access servlet
sun ram
Ranch Hand
Joined: Dec 18, 2001
Posts: 61
posted
0
Hi, Do I need to create servlet definition in web.xml file. My understating is optional, With tomcat 5 I was not able to access the sample servlet. I have sample servlet in webapps/scwd/WEB-INF/class directory (No package name used) I am using the following URL, its giving me the error message. http://localhost:8080/scwd/servlet/TestingServlet
some more info: after adding servlet mapping like this in web.xml file able to access the servlet. web.xml file: <servlet> <servlet-name>TestingServlet</servlet-name> <servlet-class>TestingServlet</servlet-class> </servlet>
<servlet-mapping> <servlet-name>TestingServlet</servlet-name> <url-pattern>/servlet/TestingServlet</url-pattern> </servlet-mapping> URL to access: http://localhost:8080/scwd/servlet/TestingServlet SR