You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Xavier Lawrence <xl...@jahia.com> on 2005/02/04 12:22:38 UTC

Struts-Bridge and the RequestDispatcher

Some time ago, I posted a message about problems with filters and a
struts--application that I was trying to make work as a portlet.

We changed the implementation by replacing the filter by a
RequestListener. Basically, the listener opens a connexion when the
request is initialized and closes it when the request is destroyed.

Everything works fine in the standalone application.

I now tried to configure it to use the struts-bridge 0.2, and I started
getting Exceptions. The Exceptions were caused because there was an
attempt to close the connexion more than once.

After some tests, I discovered that every

<jsp:include page="header.jsp">
  <jsp:param name="title" value="Delete Public Events"/>
</jsp:include>

generated a new Request. Indeed, I removed all the jsp:include tags and
got no more Exceptions (because the connexion was only closed once).

The question is: Why does a jsp:include generate a new Request ???

I can replace some jsp:include by some <%@include file="footer.jsp"%>, but
some includes like the first one, 1 need a parameter.

Anyway, the Requerst listener is at the level of the webapp. Why would the
webapp generate extra requests because of the jsp:include ??

Note that all the tests I made so far were by accessing the application as
a webapp and not as a portlet.

Thanks in advance.

Xavier


-- 
-------------=[ xlawrence at jahia dot com ]=-------------
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
www.collaborativesource.org Jahia's collaborative license




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: Struts-Bridge and the RequestDispatcher

Posted by Ate Douma <at...@douma.nu>.

Xavier Lawrence wrote:
> After some tests, I discovered that every
> 
> <jsp:include page="header.jsp">
>   <jsp:param name="title" value="Delete Public Events"/>
> </jsp:include>
> 
> generated a new Request. Indeed, I removed all the jsp:include tags and
> got no more Exceptions (because the connexion was only closed once).
> 
> The question is: Why does a jsp:include generate a new Request ???
Because the Tag probably issues a

   request.getRequestDispatcher("header.jsp?title=Delete Public Events").include(request,response)

(or at least something similar).


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org