Retrieving context from the HttpServletRequest request, is it possible?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Retrieving context from the HttpServletRequest request, is it possible?

Ghosty
I know you can get at the request from the context, but is it possible to do it vice versa?

I've tried all sorts of request.getAttribute("context") in hopes it might have been stuffed in there too.

Basically in my controller.xml I have a requestmap event type java triggering a method which comes in as the HttpServletRequest request and I want to get at the context to pass on to some other methods.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Retrieving context from the HttpServletRequest request, is it possible?

Scott Gray-2
What are you trying to do with the context once you get it?

If you want to put a value in the context then all you can do at the event stage is to add it as a request attribute.
If you want to get a value from the "context" (it doesn't really exist yet at this stage) then your best bet is to use the UtilHttp.getCombinedMap(...) method.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 26/02/2010, at 11:13 AM, Ghosty wrote:

>
> I know you can get at the request from the context, but is it possible to do
> it vice versa?
>
> I've tried all sorts of request.getAttribute("context") in hopes it might
> have been stuffed in there too.
>
> Basically in my controller.xml I have a requestmap event type java
> triggering a method which comes in as the HttpServletRequest request and I
> want to get at the context to pass on to some other methods.
>
> Thanks.
> --
> View this message in context: http://n4.nabble.com/Retrieving-context-from-the-HttpServletRequest-request-is-it-possible-tp1571081p1571081.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


smime.p7s (3K) Download Attachment