aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubt about servlet context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doubt about servlet context" Watch "doubt about servlet context" New topic
Author

doubt about servlet context

challa
Greenhorn

Joined: Mar 28, 2005
Posts: 23
Hi,
Can anyone please tell how retrieve servlet context object?
Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
You can retrieve ServletContext object by ServletConfig.getServletContext() method.
The ServletConfig object is passed to the init() method of the servlet.
More over, GenericServlet itself implements ServletConfig interface, and you can simply cal getServletContext() method as is in you servlet methods (doGet, doPost an so on)
challa
Greenhorn

Joined: Mar 28, 2005
Posts: 23
Thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt about servlet context
 
Similar Threads
servlet config
How a servlet of one Context communicate with other servlet of different context
application context and servlet context
AC and SC
servlet context,page context and application context