0 Replies Latest reply on May 4, 2006 1:50 PM by atulksh

    org.apache.jasper.runtime.TagHandlerPool concurrency issue

    atulksh

      Hi,
      We are using JBoss 4.0.3 with JDK 1.4 on Fedora Linux. We have a web application with some tags invoked from nested jsps (jsp includes). What we are seeing is that when we put stress on the application the data passed in the attributes to the tag by the jsp is not properly passed. The tag seems to get some other data and processes it and passes the wrong output to the jsp. This messes up the generated dynamic pages.

      We have seen this occurs typically under load. We can reproduce the probelm everytime we run the application. The occurance happens only in one place in our jsp tag invokation. The code looks somewhat like this -

      JSP:

      // retrieve a variable from the request object

      String tagAttrValue = (String)request.getAttribute("tag_attr");
      <ourtaglib:thetag tagAttr="<%= tagAttrValue %>" id="whatever">
      <%

      // Some jsp code where the tag is used
      // here we are getting wrong content because some other tagAttr than
      // is expected in this thread seems to get passed

      // we have checked it using a log message just before the tag invokation

      %>
      </ourtaglib:thetag>

      The tag is a iterative tag with bodycontent type as JSP. This jsp is present as an include (which is present as an include of a top level jsp).

      We are releasing all the variables (reseting them ) in doEndTag. Not only that we are also removing all set values from the pageContext in doEndTag.

      Has anybody faced this issue? Is this some concurrency issue in the org.apache.jasper.runtime.TagHandlerPool class of tomcat. I see that there is a PerThreadorg.apache.jasper.runtime.TagHandlerPool also present. How can I make tomcat use this instead of the org.apache.jasper.runtime.TagHandlerPool and would that help resolve our issue?

      Please help.

      Thanking in advance.

      Atul.