Results 1 to 2 of 2

Thread: IllegalStateException using Tiles

  1. #1
    Join Date
    Feb 2006
    Posts
    2

    Default IllegalStateException using Tiles

    I'm getting an IllegalStateException that I'd like to demonstrate by using the tiles-example included with spring-framework-1.2.6.

    1) Create an error page in web.xml
    Code:
    <error-page>
    	<exception-type>javax.servlet.jsp.JspException</exception-type>
    	<location>/exception.jsp</location>
    </error-page>
    2) Create the exception page at /exception.jsp
    3) Modify /WEB-INF/jsp/contact.jsp so that it contains the following:
    Code:
    <%
    	boolean throwIt = true;
    	if (throwIt) {
    		throw new javax.servlet.jsp.JspException("test");
    	}
    %>
    4) build and deploy
    5) test the app by navigating to the contact menu item.

    - Examine your server log and you will see:
    Code:
    java.lang.IllegalStateException
     at org.apache.coyote.Response.reset(Response.java:296)
    which of course prevents me from getting to the configured error page.

    Could anyone recommend the best way to handle exceptions in views when using Tiles.

  2. #2
    Join Date
    Feb 2006
    Posts
    2

    Default Resolution

    I changed code in org.apache.struts.tiles.TilesUtilImpl.doInclude(St ring uri, PageContext pageContext)

    from
    pageContext.include(uri);
    to
    pageContext.include(uri, false);

    and now am getting the expected behavior.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •