You can use HttpServlet.getServletContext()

... or if you are in a jsp/tag, PageContext.getServletContext()

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-----Original Message-----
From: david chan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 3:46 PM
To: Struts Users Mailing List
Subject: how to get servletContext from httpsession ? (servlet api 2.2)


Hi,
 My webapp use HttpSession.getServletContext() method
and works fine on tomcat 4.x. but not in websphere
4.x.
I just figure out HttpSession.getServletContext()
method is only avilable on servlet api 2.3.
 So in api 2.2, how can I do similar things? What I
need is in valueBound(HttpSessionBindingEvent se)
method to get an attribute from the application scope.
 With api 2.3, this seems so easy, but api 2.2 confuse
me. 
 
 Thanks.
David

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to