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

ServletContext  RSS feed

 
Abir Majumder
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Is it possible to get ServletContext from HttpServletRequest?
thanks
 
Peter Purmonen
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, via request.getSession(true).getServletContext(), assuming the code executes within a servlet context.
 
Abir Majumder
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks peter. I checked HttpSession api. That method is there. Please clarify.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65970
140
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Abir", please check your private messages for an important administrative matter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!