This content has been marked as final.
Show 3 replies
-
1. Re: Creating dummy ServletRequest and ServletResponse object
hilmer Jun 22, 2009 3:11 AM (in response to souravm)You can use:
org.jboss.portal.portlet.bridge.JBossServletContextProvider
It gives you access to the objects you need, it is located in the jar:
portal-portlet-bridge-lib.jar
As I am looking into the same things, I am curious to know which reporting solution you are integrating.
Best
Søren -
2. Re: Creating dummy ServletRequest and ServletResponse object
sambit_dixit Jun 24, 2009 1:52 AM (in response to souravm)Hi Sourav,
You can try this.JbossActionRequest acReq = new JbossActionRequest(actionRequest); Here the actionRequest is of type ActionRequest HttpRequest httpReq = acReq.getControllerContext().getServerInvocation().getServerContext().getClientRequest(); Similarly you can get handle to HttpServletResponse. If can get the handle from RenderRequest as well. Instead of ActionRequest just use RenderRequest in the above code.
-
3. Re: Creating dummy ServletRequest and ServletResponse object
sambit_dixit Jun 24, 2009 1:54 AM (in response to souravm)Alternatively if you are using a Portlet Bridge like Struts or JSF, You can even directly get the handle from the available interceptors provided by the portlet bridge. In that case it would be an implicit object under the portlet. These are injected to portlets by the bridge.
Regards
-Sambit