Results 1 to 4 of 4

Thread: Access to HttpRequest?

  1. #1

    Default 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. #2

    Default

    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

  3. #3

    Default

    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

  4. #4

    Default

    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
  •