GeeCON Prague 2014*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Is deployment descriptor  is requestion componet to access servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Is deployment descriptor  is requestion componet to access servlet" Watch "Is deployment descriptor  is requestion componet to access servlet" New topic
Author

Is deployment descriptor is requestion componet to access servlet

sun ram
Ranch Hand

Joined: Dec 18, 2001
Posts: 61
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

reference URL:
http://www.informit.com/isapi/product_id~%7BEFDC83A5-06F4-4823-9A80-3248B6CF0DDD%7D/element_id~%7BBB84D3D2-26A7-4F94-B468-CCB0F2389A42%7D/st~%7B94C03A97-1188-4875-8A06-17743BA224B7%7D/content/articlex.asp
Is any thing changed in new specification?
SR


SCSecA,SCNA,SCSA,SCWCD,SCJP
sun ram
Ranch Hand

Joined: Dec 18, 2001
Posts: 61
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
 
jQuery in Action, 2nd edition
 
subject: Is deployment descriptor is requestion componet to access servlet