This one of the page: <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%> <tiles:insert page="/templates/templatepaginatransazionale.jsp" flush="false"> <tiles ut name="corpoPagina" value="/autocarro/autocarro000body.jsp"/> ...
What I get (when an error occurs and the scriplet is invoked) is the error page, with the message: Cannot forward after response has been committed
If I don't use tiles, but jsp only, everything works fine (the client is forwarded to the correct page).
Any suggest? Thanks
Joined: Jan 23, 2002
I believe the problem is that with Tiles, you first execute the layout page which first prints some HTML including the starting tag for <html>, some more HTML, then includes the contents of a tile, a second tile, more HTML, a third tile, etc. and finally prints out the closing </html> tag. Now, if your third or fourth tile decides that the user should be forwarded somewhere, you're screwed because the other JSP's have already sent their part of the generated HTML to the web browser. You might be able to work around this by setting <%@ page flush="false" %> on top of your JSP's but I have never tried that so I'm not sure whether it would work.