This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to use HttpServletRequest to get an Application scope variable ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "how to use HttpServletRequest to get an Application scope variable ?" Watch "how to use HttpServletRequest to get an Application scope variable ?" New topic
Author

how to use HttpServletRequest to get an Application scope variable ?

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
how to use HttpServletRequest to get an Application scope variable ?

Thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"You can't get there from he-ya"
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html

But you can get to the session from your request.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html

From the session, you can get a reference to the ServletContext.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html

Which will, of course give you access to the context attributes.



Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: how to use HttpServletRequest to get an Application scope variable ?
 
jQuery in Action, 3rd edition