Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to read a page request parameter from portlet in liferay

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.23k
    Comment on it

    Hello guys,

    Page request parameter in which a parameter send with liferay page URLwill be like i.e

    http://192.168.3.10:8080/group/dentalnotebook/patientprofile?patientId=140701
    



    we can read a page request parameter in portlet controller and view.jsp in the liferay 6.2.


    Below example will helps you to read page request parameter.

    Read parameter in controller

    HttpServletRequest request=PortalUtil.getHttpServletRequest(actionRequest);
    
    HttpServletRequest originalRequest = PortalUtil.getOriginalServletRequest(request);
    
    long patientId=Long.parseLong((String)ParamUtil.getString(originalRequest, "patientId"));
    

    Read parameter in portlet JSP(wiew.jsp)

    HttpServletRequest originalRequest = PortalUtil.getOriginalServletRequest(request);
    
    long patientId=Long.parseLong((String)ParamUtil.getString(originalRequest, "patientId"));
    

    Thank 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: