More generally, is it possible to forward from within a child tile? I know I can forward within the original page, but I can't seem to get forwarding working from within a layout page or an included tile. I've tried increasing the buffer size with <%@ page buffer="32kb" %>, but this doesn't do anything. I've also tried <tiles:insert ... flush="false">, but the flush attribute doesn't make a difference. I still get the message about an inability to forward because the response has already been committed. Does anyone have clues on why this behavior occurs? Does Tiles flush the headers and part of the page out before loading the layout? Can I disable this behavior somehow?
On Thu, 28 Mar 2002, Wellie W. Chao wrote: > Date: Thu, 28 Mar 2002 22:23:58 -0500 (EST) > From: Wellie W. Chao <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Re: Tiles and struts action > > Did you ever figure out the solution to the Response has been committed > problem? I am now having a similar problem with a custom tag. I have a tag > called checkLogin that I place in a page like so: > > ----- > <%@ taglib uri="/WEB-INF/app.tld" prefix="app" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> > > <app:checkLogin role="admin"/> > <html:html locale="true"> > ... > </html:html> > ----- > > I get the following error: > [ServletException in:/tiles-layouts/adminLayout.jsp] > java.lang.IllegalStateException: Cannot forward after response has been > committed' > > The code for the checkLogin tag checks to see if a user is logged in. If > so, and he is in the role, the tag does nothing. If not, the tag forwards > to the login page. > > I would rather use the tag than container-based security because I want to > protect pages by classes of layout rather than by directory structure. > > On Wed, 13 Mar 2002, Hill, Donald wrote: > > > Date: Wed, 13 Mar 2002 09:48:54 -0500 > > From: "Hill, Donald" <[EMAIL PROTECTED]> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]> > > Subject: FW: Tiles and struts action > > > > > > -----Original Message----- > > From: Hill, Donald > > Sent: Tuesday, March 12, 2002 12:44 PM > > To: 'Jakarta Tag Libraries Users List' (E-mail) > > Subject: Tiles and struts action > > > > > > I am trying to use a struts action in a tile definition, something like > > this. > > > > > > <definition name="site.mainLayout" path="/layouts/classicLayout.jsp"> > > <put name="title" value="Tiles Blank Site" /> > > <put name="header" value="/tiles/common/header.jsp" /> > > <put name="menu" value="site.menu.bar" /> > > <put name="footer" value="/tiles/common/footer.jsp" /> > > <put name="body" value="/tiles/body.jsp" /> > > </definition> > > > > > > <definition name="site.index.page" extends="site.mainLayout" > > > <put name="title" value="Tiles Blank Site Index" /> > > <put name="body" value="jobList.do" /> > > </definition> > > > > I always get a Response has been committed on the template page. > > Is there a trick to using a struts action in tiles or template tags that I > > am missing. > > > > -Don- > > > > > > > > > > > > > > > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

