-
Sep 28th, 2010, 02:51 PM
#1
Access to HttpRequest?
I noticed in M2 on the RequestContext there was a wonderful method called getRequest() which returns a HttpServletRequest
http://www.springsurf.org/sites/1.0....stContext.html
However in M3 the RequestContext has no such method.
http://www.springsurf.org/sites/1.0....stContext.html
What is the work around to get to the HttpServletRequest in M3? My end result is getting to the HttpSession
Thanks
-
Sep 29th, 2010, 04:10 AM
#2
Additional levels of abstract were added around RequestContext to allow for Portlet support (i.e. they do not have access to HttpServletRequest).
Other threads have already mentioned how to get hold of HttpServletRequest:
http://forum.springsource.org/showth...rvletReques t
Search the forums for "HttpServletRequest"
Cheers,
Kev
-
Sep 29th, 2010, 05:29 PM
#3
I have seen those posts and I see how this could work in a Java class but is this possible to do this in a Javascript webscript?
To rephrase, how can one get the HttpServletRequest from a Javascript webscript?
Thanks
-
Sep 30th, 2010, 03:34 AM
#4
No you are abstracted away from the concept of an httprequest. There is not direct access to the session from a javascript webscript. You will need a Java backed webscript to do that.
Cheers,
Kev
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules