struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: JSP Components
Date Thu, 22 Mar 2001 19:48:54 GMT
Sorry for the late response on this ... email problems ...

Rey Francois wrote:

> In the context of building reusable JSP components, I have been confronted
> with the following limitation that both the Struts templating and the
> Components from Cedric Dumoulin currently have.
>
> In a word, this limitation is actually due to the fact that none of them
> provide a way to perform an action specific to the included JSP. For
> example, an application home page may be composed of a body that actually
> corresponds to another page in the web application. In this case, the body
> is already modeled with a mapping and an action that performs the necessary
> logic to retrieve the dynamic content. When servicing the home page, one
> would logically like to reuse that action in order to avoid the duplication
> of its logic in the action servicing the home page.
>
> One way to do this would be to directly call the action to reuse within the
> perform() of the action servicing the home page. However this is not very
> flexible because it requires manual intervention.
>

Another approach to this would be to use a reuquest URI path on your include
that actually goes through the controller servlet again (instead of directly to
the JSP page).  This technique lets the included action perform any necessary
preparation before forwarding to the page that ultimately creates the included
response.


>
> My short research in past postings actually seems to indicate that this
> problem has been mentioned before under various forms. A proposal for a
> portal framework was discussed before, and such framework would require such
> feature. In one instance the Jetspeed framework was considered for
> integration with Struts. In another case one talked about allowing the
> ActionServlet to do both forwards and includes.
>
> My questions then are:
> - has anybody else been confronted to this limitation, and if so, did you
> avoid the problem (for example by using frames) or did you find a solution?
> - would such a feature be considered for inclusion in either Struts or the
> Components framework from Cedric Dumoulin?
> - anybody having further thoughts on this issue?
>

The ability to perform a forward or an include, instead of calling your own
Action class, was recently added.  The controller servlet still does it's normal
processing of any form bean, but can then forward or include any content that is
already available at separately addressable URIs.


>
> Thanks for your feedback on this topic.
>
> Fran├žois Rey
> Financial WebSuite
> The Capital Markets Company
> http://www.capco.com/
>

Craig McClanahan



Mime
View raw message