You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mo...@dit.unitn.it on 2003/03/05 12:58:21 UTC
Urgent, TilesRequestProcessor
Hi, i've a problem with TilesRequestProcessor;
i insert in my struts-config.xml the definition of my classes:
<controller processorClass="struts.requestP" />
and requestP extends TilesRequestProcessor (i don't understand whi if i use
tiles plug-in i don't exstend RequestProcessor..)
in this class i overload the processPreprocess and processForwardConfig methods,
now if i call an jsp page this processor dont't work (i use System.out for see
if it work..), it's work if i use TilesAction...whi?
example of my page:
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<tiles:insert definition="base" flush="true" controllerUrl="/til.do" />
and in my struts-config.xml:
<action type="struts.tilesA" path="/til">
<forward name="success" path="mainLayout"/>
</action>
in my tiles-defs.xml:
<definition name="base" path="/tilesLayout/baseLayout.jsp">
<put name="page" value="baseEstesa" />
<put name="title" value="prova.titolo" />
<put name="header" value="/tilesLayout/header.jsp" />
<put name="body" value="/tilesLayout/body.jsp" />
<put name="menuI" value="/tilesLayout/menuI.jsp" />
<put name="footer" value="/tilesLayout/footer.jsp" />
</definition>
in this case i use an TilesAction and i see the System.out from my processor(my
processor work),but if i don't use the TilesAction:
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<tiles:insert definition="base" flush="true" />
the processor don't work...whi?
Thanks,
Alessio
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Urgent, TilesRequestProcessor
Posted by Cedric Dumoulin <ce...@apache.org>.
Hi,
If you use Tiles, and want to extends the RequestProcessor, you need
to extend the TilesRequestProcessor. This later extends the
RequestProcessor, so you transitively extends it also.
The TilesRequestProcessor purpose is to catch the definition names
used in urls. If a struts url (like forward="") is a definition, then
this definition is inserted in place of the url. The
TilesRequestProcessor doesn't interfere with other functionalities
provided by the original processor.
To understand exactly what happen, you can check the RequestProcessor
workflow (defined in the process() method). This will help to understand.
Cedric
modena@dit.unitn.it wrote:
>Hi, i've a problem with TilesRequestProcessor;
>i insert in my struts-config.xml the definition of my classes:
><controller processorClass="struts.requestP" />
>and requestP extends TilesRequestProcessor (i don't understand whi if i use
>tiles plug-in i don't exstend RequestProcessor..)
>in this class i overload the processPreprocess and processForwardConfig methods,
>now if i call an jsp page this processor dont't work (i use System.out for see
>if it work..), it's work if i use TilesAction...whi?
>
>example of my page:
><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
><tiles:insert definition="base" flush="true" controllerUrl="/til.do" />
>
>and in my struts-config.xml:
><action type="struts.tilesA" path="/til">
> <forward name="success" path="mainLayout"/>
></action>
>
>in my tiles-defs.xml:
>
><definition name="base" path="/tilesLayout/baseLayout.jsp">
> <put name="page" value="baseEstesa" />
> <put name="title" value="prova.titolo" />
> <put name="header" value="/tilesLayout/header.jsp" />
> <put name="body" value="/tilesLayout/body.jsp" />
> <put name="menuI" value="/tilesLayout/menuI.jsp" />
> <put name="footer" value="/tilesLayout/footer.jsp" />
></definition>
>
>in this case i use an TilesAction and i see the System.out from my processor(my
>processor work),but if i don't use the TilesAction:
>
><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
><tiles:insert definition="base" flush="true" />
>the processor don't work...whi?
>
>Thanks,
>Alessio
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org