Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to extract HttpServletRequest object from Portlet RenderRequest object?

    • 0
    • 3
    • 1
    • 3
    • 0
    • 0
    • 0
    • 0
    • 2.51k
    Comment on it

    Sometimes when we pass data from action method to a JSP and from JSP to a portlet's render phase then we need to extract HttpServletRequest object from Portlet RenderRequest object to get the parameter values.

    By writing the below lines you can easily extract HttpServletRequest object from Portlet RenderRequest object:

    HttpServletRequest httpRequest = PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(renderRequest));
    

    Then, you can get parameters from HttpServletRequest as below:

    String emailAddressId = httpRequest.getParameter("emailId");
    

    Hope this will help you :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: