File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlet Object in Servlet Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Object in Servlet Class" Watch "Servlet Object in Servlet Class" New topic

Servlet Object in Servlet Class

somasundar venkatesh

Joined: Mar 01, 2011
Posts: 14
Hi All,
Can we access or get Servlet object in Servlet Class. If so, then what type and how we can perform operations on that object.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Servlet objects are created and managed by a servlet container such as Tomcat.

Directing a request to the appropriate servlet is handled by the servlet container also.

Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1341

As per J2EE specifications, servlet object creation should be managed by web container itself.

Any specific reason you want to access Servlet object ?

~ abhay

Oracle certified Java 8 Programmer I (1Z0-808), Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
I agree. Here's the link:
subject: Servlet Object in Servlet Class
It's not a secret anymore!