This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletContext object

 
naresh govindaswmay
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Remko Strating
Ranch Hand
Posts: 893
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
James Mark
Ranch Hand
Posts: 115
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletContext object can also be obtained from
public ServletContext getContext(java.lang.String uripath) method in the
ServletContext interface
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic