How to get HttpServletRequest in JSR 168/286 portlets as it does not extend Servlets?


Getting HttpServletRequest is very easy on JSR 168/ 286 portlets although that is not recommended because portlet itself provides PortletRequest that contains most of the attributes that HttpServletRequest contains.

In doview() method, use the below code

HttpServletRequest httpServletRequest = (HttpServletRequest) (;

No comments:

Post a Comment

Recent Posts

Popular Posts

© 2011-2019 Web Portal Club