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 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 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" %> one-pane-template.jsp is <%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %> 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]
RE: Problem forwarding from a Tile or Template.
I assume you mean, add the following to the struts-config.xml 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 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 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" %> > > > > >one-pane-template.jsp is ><%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %> > > > > > > > >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]
Re: Problem forwarding from a Tile or Template.
You are going in the right direction, but you should declare the tiles plugin as follow in the struts-config.xml: This should be inserted after the 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 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 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 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" %> one-pane-template.jsp is <%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %> 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]