2011/8/28 Bob Garcia <bobg.li...@gmail.com>:
> Apologies if this is a known issue or a simple config error on my part. I
> have not been able to find anything similar in my searches.
>
> I am using tomcat-7.0.20 configured with
> protocol=org.apache.coyote.http11.Http11NioProtocol, and using OpenJDK
> 1.6.0_22 on Fedora 15.
>
> I have a webapp at webapps/demo and a servlet mapped to demo/foo.  Tomcat is
> also serving some static content from the demo directory, including image
> files in demo/imgs.  I have instrumented by event method to report values
> associated with BEGIN events.

What API are you using: Comet, or Servlet 3.0 async?

>
> The problem (as I see it) is that my servlet is occasionally, non
> deterministically, receiving requests for static that should (I think) be
> handled directly by Tomcat. For example:
>
> http://192.168.0.2:8080/demo/imgs/example_200.jpg
>
> as reported by event.getHttpServletRequest().getRequestURL()
>
> Based on my understanding, my servlet should never receive such a request
> since it fails to conform to my servlet-mapping as shown below:
>
> <servlet-mapping>
>   <servlet-name>demo</servlet-name>
>   <url-pattern>/foo</url-pattern>
> </servlet-mapping>
>
> Another, perhaps related, problem is that I am seeing, again
> non-deterministically, is that event.getHttpServletResponse().isCommitted()
> is occasionally returning true when I initially receive the BEGIN message.
> Specifically, this always seems to be the case when I receive non-servlet
> URLs such as the one above (though it is also occasionally true for servlet
> related URLS as well).
>
> Any help/pointers is much appreciated.
>

Both issues sound bad.

As the first thing I suggest you to add the following line to
catalina.properties:
org.apache.catalina.connector.RECYCLE_FACADES=true

That property is mentioned on the "system properties" page in the
configuration reference, That is to make sure that none of your code
holds references to request/response objects outside of their
lifecycle.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to