You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom Wasner <to...@wrq.com> on 2000/07/07 23:27:59 UTC

Needing nokeepalive for redirect (was IE 5 + Apache Tomcat)

Hi,

I am following up on the thread below that I searched for and pulled out of
this list's archives. I've run across the exact same problem as Manie
(practically word for word) on NT4SP6 with IIS4 when using one jsp to
redirect to another. I am using IE5 Under IIS, to configure the nokeepalive
parameter, I use the HTTP Keep-Alives Enabled checkbox on the Performance
tab for the Web Site Properties in IIS. However, for performance reasons, I
would like to have Keep-Alives enabled. Turning this parameter off is a
short term workaround for me. 

One interesting thing is if my IE5 install is brand new, then the first time
I run these jsps, I can get to the second .jsp (Often with some sort of
error, however. The error is too random to be meaningful.) Netscape
Communicator 4.73 is working ok. 

I have an install of ServletExec 2.2 by New Atlanta on NT4 and IIS4 that
does not have this problem when using IE5. 

I have not seen any followups from the below mentioned thread although I
have found a lot of emails about problems in redirect. I wonder if this
behavior has been reported as a bug and if so, has it been fixed? Please to
tomcat-user as well as tomcat-dev since I am not subscribed to tomcat-dev at
this time. 

thanks in advance,
Tom Wasner
tomw@wrq.com


============================================================================
=

Hi Gladwell

I tried that but I still get the same result.  It just chops of half of the
login
screen and prepend it to the top of the next jsp content.  After that
it outputs the header info and then the jsp contents and then a 0 (zero)
at the very end.  As I said earlier, if you refresh the browser it is fine.
The frustrating thing is that it only happens in IE5/4

Each jsp page that I have includes a header.jsp and a footer.jsp
What was very strange is that when I decreased the size of footer.jsp
I got the stuffup on some pages and on other pages not!

Regards
Manie Coetzee

"Gladwell, Ricardo" wrote:

> The problem may lie with the chunking. I have discovered that some
> interpreters of HTTP/1.1 do not like it when a chunked HTTP response
begins
> with a double CRLF sequence. To "cure" this ensure that the first line of
> your JSP page always contains non-whitespace content BEFORE the first
> carriage return thus ensuring that a double CRLF sequence does not start
> your page. Let me know if that helps, yours...
>
> --
> Ricardo Gladwell, Web Developer
> Demon Internet, Westhumble House,
> Dorking Business Park, Dorking. RH4 1HJ
> Tel: +44 (01306) 732 356
> Mobile: +44 (07779) 841 444
>
> > -----Original Message-----
> > From: Manie Coetzee [mailto:manie@hemtech.co.za]
> > Sent: 20 June 2000 22:03
> > To: tomcat-dev@jakarta.apache.org
> > Subject: IE5 + Apache Tomcat
> >
> >
> > Hi
> >
> > I have mentioned before that I have a problem with
> > Tomcat and IE5/IE4.  I have the follwoning setup.
> >
> > A login jsp page, a main menu jsp page.  Each page have a
> > <%@ include file="Footer.jsp" %> directive right at the end.
> >
> > When you log in the Login jsp page will redirect the browser to the
> > main menu.  At this point everything is still fine.  When you login
> > again,
> > and is directed to the main menu, I get html characters on the screen
> > with a part of the login screen.  The browser is also loading for
> > a while, on what I don't know.
> >
> > I went and made the Footer.jsp contents much smaller, about one
> > sentence.
> > When I did this everything worked fine.  When I have about 5 sentences
> > I get the above problem.  This problem only occurs in IE5/4.  Netscape
> > works fine.
> >
> > The following is part of the html characters that I get:
> >
> > HTTP/1.1 200 Date: Tue, 20 Jun 2000 20:58:00 GMT Server: Apache/1.3.12
> > (Win32) tomcat/1.0 Content-Language: en Pragma: no-cache
> > Servlet-Engine:
> > Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.3.0;
> > Windows NT 4.0
> > x86; java.vendor=Sun Microsystems Inc.) Keep-Alive: timeout=15, max=98
> > Connection: Keep-Alive Transfer-Encoding: chunked Content-Type:
> > text/html;charset=8859_1 ad7
> >
> > The only thing I can think is that some internal buffer is not flushed
> > although I call <% out.flush() %> in the Footer.jsp.  The
> > funny thing is
> > that
> > when I refresh the page, everything looks fine and the funny stuff
> > dissapears.
> >
> > Can anybody help?  I tried to be as specific as possible.  If somebody
> > have not encountered something like this can someone at least give me
> > a couple pointers to what or where I must look at.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >

>>>THE FIX ... so far
>>>----
>>>Hi,
>>>
>>>It looks like I solved the problem (Until proven wrong). In the
>>>httpd.conf file I
>>>added the following line:

>>>BrowserMatch "Mozilla/4.0" nokeepalive

>>>The reason I put "Mozilla/4.0", is in the examples context that comes
>>>with
>>>Tomcat, I ran the 'Request Headers" servlet and it reported that
>>>the user agnet is 'Mozilla/4.0'

>>>This seemed to do the trick.  In the httpd.conf file there is a comment
>>>about
>>>IE4 and keeping connections alive.  I still don't realy know what
>>>happened
>>>exactly and why this work, but if it aint broken don't fix it hey!

>>>Thanks for the help
>>>Manie coetzee