My problem is to obtain PortletRequest
from HttpServletRequest
I put this sentence:
PortletRequest request = (PortletRequest) HttpServletRequest.getAttribute();
What should I put into the .getAttribute();
When I developed in IBM Portlet Factory, I used .getAttribute(Constants.PORTLET_REQUEST)
The Constants are into one .jar
Now I need to do this with Portlet
in JSR168
or there is another way to obtain PortletRequest
without using HttpServletRequest
I hope you can help me
You can use something like this:
(PortletRequest) request.getAttribute("javax.portlet.request");
(PortletResponse) request.getAttribute("javax.portlet.response");
Request and response are of HTTPServletRequest
and HTTPSevletResponse
.