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]>

Reply via email to