This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting ServletContext  RSS feed

 
Karne Reddy
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In how many ways can we get the ServletContext Object and from which objects?

In one mock test, I have seen tat we can get ServletContext from HttpServlet class instead of GenericServlet class?


AdvaNcely thanx
-----------
SCJP
 
Sunder Ganapathy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get it from ServletConfig, HttpSession, Generic Servlet and Of course
from ServletContext itself as getContext.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Also from ServletContextEvent, ServletContextAttributeEvent, HttpSession and pageContext object in JSP.

Thanks
 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

And also from FilterConfig
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!