You are going in the right direction, but you should declare the tiles plugin as follow in the struts-config.xml:


 <plug-in className="org.apache.struts.tiles.TilesPlugin" >
   <set-property property="definitions-config"
                    value="/WEB-INF/tiles-defs.xml" />
   <set-property property="moduleAware" value="true" />
 </plug-in>

This should be inserted after the </action-mappings> tags.

You can check the struts-config.xml file in tiles-documentation.war as example.

Cedric

[EMAIL PROTECTED] wrote:

I assume you mean, add the following to the struts-config.xml

        <controller
                contentType="text/html;charset=UTF-8"
                debug="3"
                locale="true"
                nocache="true"
                processorClass="org.apache.struts.tiles.TilesRequestProcessor"
        />

But having done this I now get;

Cannot initialize RequestProcessor of class org.apache.struts.tiles.TilesRequestProcessor: java.lang.ClassCastException: org.apache.struts.tiles.TilesUtilImpl

Am I going in the right direction?

T.

-----Original Message-----
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 09:58
To: Struts Users Mailing List
Subject: Re: Problem forwarding from a Tile or Template.



Hi,

The provided code should work with Tiles if you have set the TilesRequestProcessor.

The problem is that the jsp spec forbid the use of forward once the response is committed. But the jsp spec also said that a response is committed when you do an "insert()". Tiles, and Templates, use include(). Struts action <forward> tag use forward(). So there is a problem. The TilesRequestProcessor takes care of this problem, and use include() instead of forward() when you use a <forward ...> in a struts action.

Cedric


[EMAIL PROTECTED] wrote:




I get "Cannot forward because the response has already been committed". I get the same response using Templates or Tiles. Here is a simplistic version of my problem.

My JSP is ...
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %>
<tiles:insert page="/one-pane-template.jsp" >
  <tiles:put name="main" value="/requestCreate1.do" />
</tiles:insert>

one-pane-template.jsp is ....
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %>
<html>
        <head />
        <body>
                <tiles:insert name="main"/>
  </body>
</html>

I am trying to attain a Tiled display, where one of the Tiles is a wizard. As there are a lot of initial form parameters for this app, I call the action and form to initialise the data. Hence, the ".do" call.

If I create an Action for the Tile container (one-pane-template.*) and populate the necessary beans there, calling "one-pane-template.do" and "requestCreate1.jsp" works, but this seems the wrong place to put the logic.

FYI - I initially raised this as a bug (for Templates) http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18469, but it was invalidated as Tiles had superseded it.

Thanks

Tony.


Visit our website at http://www.ubswarburg.com


This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Visit our website at http://www.ubswarburg.com


This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to