Announcement Announcement Module
Collapse
No announcement yet.
Access to HttpRequest? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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...ServletRequest

    Search the forums for "HttpServletRequest"

    Cheers,

    Kev

    Comment


    • #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

      Comment


      • #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

        Comment

        Working...
        X