File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlets access directly. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets access directly." Watch "Servlets access directly." New topic

Servlets access directly.

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
My doubt is can we access another servlet without doing servlet mapping in web.xml. If, how??
Directly in the sense forwarding from one servlet to other but without doing servlet mapping in web.xml.

Thanks and Regards.
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761
If you are using Servlet 3.0 container, then you could use this annotation to map the servlet without the need to fiddle with web.xml.

Jigar Naik

subject: Servlets access directly.
It's not a secret anymore!