aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes ServletContext object 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 "ServletContext object " Watch "ServletContext object " New topic
Author

ServletContext object

naresh govindaswmay
Ranch Hand

Joined: Aug 15, 2007
Posts: 90
hi,
The ServletContext object are accessible from which of the following objects?
Please select three correct answers.
A.HttpServlet
B.GenericServlet
C.HttpSession
D.ServletConfig
E.ServletResponse


Here i have selected A,B and D answer.but they told A,C and D is the answer.Please anybody clear this doubt.I am waiting for the updates.


Thanks and Regards<br />Naresh govindaswamy
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
The method from the HttpSession exists but is depreciated from version 2.1 and should not used anymore.

Generic servlet is a abstract class and can not be initialized but implements the servlet interface. The HttpServlet uses the inherited method from Generic Servlet for getting the ServletContext getServletContext.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

The method from the HttpSession exists but is depreciated from version 2.1 and should not used anymore.

Is it ? Please check that statement again.


[My Blog]
All roads lead to JavaRanch
James Mark
Ranch Hand

Joined: Jul 05, 2007
Posts: 115
ServletContext object can also be obtained from
public ServletContext getContext(java.lang.String uripath) method in the
ServletContext interface


SCJP1.4(96%) SCWCD1.4(92%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServletContext object