Hello, A quick synopsis of our problem: We are using Tomcat 4.0.6. We have a JSP which includes 8 other JSPs using a jsp:include tag inside of a loop (these includes do _not_ have a flush="" attribute). We call this jsp the container, and the included JSPs components. All of these JSPs share a common base class which takes the container and puts the pageContext into session for access by the component JSPs. It may be worth noting that the jsp:include tag is inside of a jsp custom tag that performs a loop.
If certain variables need to be shared by all of the components, they are put into the pageContext with pageContext.setAttribute(), and retrieved by getting the container's pageContext from session and getting variables out with getAttribute(). We chose to use the pageContext so that when the container JSP is finished loading, all of these variables will go away. The problem is that occasionally (usually under load), we are seeing that the pageContext is getting released before the container JSP is finished. This happens rarely, and most of the time, the page loads up fine. But, we are seeing that in the first few JSPs that are included, the pageContext has all of the variables required, but then suddenly, the attributes are cleared out. We then get a java.lang.IllegalStateException. This means that for some reason, our pageContext has been released, and we can't figure out why. Does anyone know if Tomcat 4.0.x has a problem with the pageContext? What are the rules that cause the release() method of the pageContext to be run? Is it bad practice to put jsp:includes inside of a custom tag loop? Thanks Ian.
