You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by david chan <da...@yahoo.com> on 2003/03/18 21:45:42 UTC
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: how to get servletContext from httpsession ? (servlet api 2.2)
Posted by Mark Galbreath <ma...@qat.com>.
If you are trying to access the context in an Action class,
this.getServlet().getServletContext();
I don't know anything about valueBound().
Mark
-----Original Message-----
From: david chan [mailto:david_tomcat@yahoo.com]
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org