1 Reply Latest reply on Feb 14, 2003 12:05 PM by Bernie Wing

    JSP POST Method Failover - jboss-3.0.6_tomcat-4.1.18

    Bernie Wing Newbie

      This problem only occurs when AJP13 and jvmRoute have been added to the tomcat41-service.xml. I have instances on two host in one cluster and I'm using the all server configurations. To the tomcat config I have added the following for the AJP13:
      <!-- Define an AJP 1.3 Connector on port 8009 -->


      I have the following in my JSP:
      <form name="clear" action="<%=response.encodeURL("/miniApp/MiniServlet")%>" method="post">




      <input type="hidden" name="COUNT" value=<%=String.valueOf(counter)%>>



      I start a jsession on server1 and then kill server1. When the jsession failsover to server2, I get the following exception when my servlet attempts to read the URL:
      2003-02-11 08:57:32,192 INFO [org.jboss.web.localhost.Engine] HttpRequestBase.parseParameters content length mismatch
      URL: http://ielback.ihs.com:8181/miniApp/MiniServlet Content Length: 66 Read: 0
      Bytes Read:
      2003-02-11 08:57:32,196 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[MiniServlet]: Servlet.service() for servlet MiniServlet threw exception
      java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read < content length
      at org.apache.catalina.connector.HttpRequestBase.parseParameters(HttpRequestBase.java:685)
      at org.apache.catalina.connector.HttpRequestBase.getParameter(HttpRequestBase.java:718)
      at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:171)
      at MiniWar.MiniServlet.doGet(MiniServlet.java:87)
      at MiniWar.MiniServlet.doPost(MiniServlet.java:104)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.catalina.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:78)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
      at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
      at java.lang.Thread.run(Thread.java:536)

      If I change the JSP's form method attribute to "get", everything failsover successfully. I know that sticky sessions didn't work with previous versions and I don't know if this version is suppose to. Other then this error it appears the sticky session cluster failover works.
      Please let me know if this is a valid issue or not.

      Thanks in advance,
      Benie