Can LocalDispatcher be used to pass request and response object to jsp:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can LocalDispatcher be used to pass request and response object to jsp:

vijay Si
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
Reply | Threaded
Open this post in threaded view
|

Re: Can LocalDispatcher be used to pass request and response object to jsp:

Adrian Crum
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
>