You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by vijay Si <st...@gmail.com> on 2007/10/09 16:41:28 UTC
Can LocalDispatcher be used to pass request and response object to jsp:
Hi
I have following in my controller.xml
<request-map uri="main">
<security https="true" auth="true"/>
<event type="java" path="org.ofbiz.result.DataQuerry" i
nvoke="doQuerry"/>
<response name="success" type="view" value="result"/>
<response name="error" type="request-redirect" value="main"/>
</request-map>
<view-map name="result" type="jsp" page="/int.jsp"/>
Now lets look at doQuerry()
try
{
Here i will retrieve data form DB using entity engine
return sucess
}
Now i also want to pass the retrieved Data from DB to int.jsp as request
and response object. (or may be localdispatcher object?)
1) Can LocalDispatcher object do this by passing (request, response)
objects.
I think basically i wanted to use
RequestDispatcher rd = request.getRequestDispatcher(/int); // int of
int.jsp
rd.include(request, response);
But this procedure is used for servlets , here instead i have a java service
(can i do the same thing in this service?)
I some how want my data to reach int.jsp's scope as request and response
object.
Any Inputs?
Regards
Re: Can LocalDispatcher be used to pass request and response object
to jsp:
Posted by Adrian Crum <ad...@hlmksw.com>.
Vijay,
I don't think you will find much help with JSPs in this community. OFBiz stopped using JSPs some
time ago - the last of the JSP code was removed in March.
I would recommend that you re-think your strategy and try to use the supported Widget/Bsh/Ftl approach.
-Adrian
vijay Si wrote:
> Hi
>
> I have following in my controller.xml
> <request-map uri="main">
> <security https="true" auth="true"/>
> <event type="java" path="org.ofbiz.result.DataQuerry" i
> nvoke="doQuerry"/>
> <response name="success" type="view" value="result"/>
> <response name="error" type="request-redirect" value="main"/>
> </request-map>
>
> <view-map name="result" type="jsp" page="/int.jsp"/>
>
> Now lets look at doQuerry()
> try
> {
> Here i will retrieve data form DB using entity engine
> return sucess
> }
>
> Now i also want to pass the retrieved Data from DB to int.jsp as request
> and response object. (or may be localdispatcher object?)
>
> 1) Can LocalDispatcher object do this by passing (request, response)
> objects.
>
> I think basically i wanted to use
> RequestDispatcher rd = request.getRequestDispatcher(/int); // int of
> int.jsp
> rd.include(request, response);
>
> But this procedure is used for servlets , here instead i have a java service
> (can i do the same thing in this service?)
>
> I some how want my data to reach int.jsp's scope as request and response
> object.
>
> Any Inputs?
> Regards
>