tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Hoegg <rho...@isisnetworks.net>
Subject Re: Possible bug in RequestDispatcher?
Date Mon, 04 Nov 2002 19:53:06 GMT
OK, that clarifies things a little bit.  If the problem isn't with 
RequestDispatcher, I am even more puzzled.  I have narrowed the problem 
down to a particular use case:

I have a single filter that calls 
getFilterContext().getServletContext().getRequestDispatcher("/WEB-INF/templates/form.html").forward(request,

response) in the absence of a particular session variable on the request.

This filter is mapped to /* and I have a single servlet mapped to /Display

Pointing my browser at /<webapp>/Display : things work as expected.
Pointing my browser at /<webapp>/ : things work as expected
Pointing my browser at /<webapp>/staticfile.html : problem.

View Source in my browser shows this:
-----------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
  <head>
    <title></title>
  </head>
  <body>
    <form action="j_security_check" method="POST">
      <p>U
----------------------

That is the beginning of the html file I am trying to forward() to.

It seems like my HttpServletResponse's OutputStream is getting closed 
prematurely in the exact same place in my forwarded file.

So what could it be?!

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net

Craig R. McClanahan wrote:

>In Servlet 2.3 (i.e. Tomcat 4.x), filters are *not* invoked on request
>dispatcher calls -- only on the original request.  In Servlet 2.4 (i.e.
>Tomcat 5.x) you can optionally configure which filters should be used on
>forwards, includes, or both, with suitable settings in web.xml.
>
>Craig
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message