This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Is deployment descriptor is requestion componet to access servlet  RSS feed

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
sun ram
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!