struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregor Rayman" <>
Subject How to include an .do from a jsp
Date Fri, 24 Aug 2001 09:32:53 GMT
Hi all, 

some time ago I've written about my problem including *.do in jsps.
E.g. in the template tags. The problem is caused be the way, how 
Action/ActionServlet controls the invocation of its view.

The request is either forwarded or redirected to the view and neither
forwarding nor redirecting work, when the action is included.

My workaround is, to let the Action's perform() method to return null
and then in my composite view include the sub-view.

So something like:

<jsp:include page="" />
<jsp:inlcude page="thing-success.jsp" />

This definitely breaks the MVC pattern, since the composite view 
controls the view of the sub-action.

My proposal: 

Now I can specify in struts-config.xml that a forward should be
redirected with redirect="true". What about allowing include as
well? Even better would be, it ActionServlet recognised, the
action is beeing included and it would include the view instead
of forwarding/redirecting to it.

I'll try to have a look at it in September and submit a patch.


View raw message