You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Pierce <Jo...@seagram.com> on 2001/08/22 15:42:05 UTC

Re[2]: Re[2]: Re[2]: Mozilla and Tomcat

4.0b7 works fine for me. You might want to try it with the example jsps. Try
this,

1. Add the following lines to the top of one of the examples (i.e. Snoop)

response.setHeader("Pragma", "No-cache");
response.setDateHeader("Expires", 0);
response.setHeader("Cache-Control", "no-cache");

    2. Clear your browser cache

    3. Test the example and see whether you are still having the issue. I have
used netscape and ie successfully against Tomcat 4.0b7 without seeing this type
of problem.


____________________Reply Separator____________________
Subject:    Re: Re[2]: Re[2]: Mozilla and Tomcat
Author: tomcat-user@jakarta.apache.org
Date:       8/22/2001 1:23 PM

On Wednesday 22 August 2001 00:38 am, you wrote:
> It sounds like a problem in your jsp or servlet.
>
> It looks like your response is not being truncated, since you get your
> </html> tag. Make sure to flush the output stream before closing it in
> servlets. Also, you might want to check whether you are using page.forward
> since this will replace the response with the forwarded page response.
> Without seeing your servlet or jsp, It's difficult to help further.
>
No, it's not. The jsp/servlets are fine. It's only when tomcat rebuilds the 
jsp class from the jsp page when it changes. After a few refreshes, it works, 
and then works for good (until I change it).

> What version of Tomcat are you running. You should be running either 3.2.3
> if you are using the 3.2 branch,  some version of 3.3, or 4.0b7 which would
> be best.

4.0beta7

>
> ____________________Reply Separator____________________
> Subject:    Re: Re[2]: Mozilla and Tomcat
> Author: tomcat-user@jakarta.apache.org
> Date:       8/21/2001 11:45 PM
>
> Hello.
>
> We're getting off topic here. I have caching turned offf, however why would
> mozilla print <html><body></body></html> when the JSP page doesnt produce
> that (well it does, but with a load of other stuff in there!). I can
> understand it caching pages, but not a page that has never been produced.
>
> Tomcat must be doing something odd. Perhaps it is indeed returning just:
>
> <html><body></body></html> when it's rebuilt a page recently?
>
> I dunno, but it's a server problem not a caching problem IMHO.
>
>
> John
>
> On Tuesday 21 August 2001 23:28 pm, you wrote:
> > You can force the response to not be cached by the browser and proxy
> > servers by setting headers in your jsp response before writing your html
> > response header. Make sure to explicitly clear your browser cache once
> > after doing this to get rid of any latent cached pages.
> >
> > response.setHeader("Pragma", "No-cache");
> > response.setDateHeader("Expires", 0);
> > response.setHeader("Cache-Control", "no-cache");
> >
> > ____________________Reply Separator____________________
> > Subject:    Re: Mozilla and Tomcat
> > Author: tomcat-user@jakarta.apache.org
> > Date:       8/21/2001 1:55 PM
> >
> > At 01:50 PM 8/21/2001, you wrote:
> > >I've ran into similar problems with Internet Explorer. Not exactly
> > > though. Basically, I've seen IE display a cached page, even if you have
> > > caching turned off. What I do is completely exit and restart my browser
> > > each time I test a change to a servlet.
> >
> > Yeah, IE has a wicked sticky cache.

-- 
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com/)
The views expressed in this mail are my own.

Re: Mozilla and Tomcat

Posted by Lloyd Llewellyn <su...@twilight-systems.com>.
> > > > So readers, can I assume noone has anything useful to add to why Tomcat
> > > > produces: <html><body></body></html>
> 
> It might have nothing to do with it, but just yesterday I had Netscape6 produce that very page, when it shouldn't have. I was obtaining a personal certificate from Thawte and N6 gave me that output after installing the Cert. The certificate got installed, but the page source was precisely that.


Something else just occurred to me - Mozilla's "view  source" on dynamic
pages has been broken for a looong time.




Re: Mozilla and Tomcat

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
----- Original Message ----- 
From: "Lloyd Llewellyn" <su...@twilight-systems.com>
To: "tomcat-user" <to...@jakarta.apache.org>
Sent: Thursday, August 23, 2001 6:36 PM
Subject: Re: Mozilla and Tomcat


> 
> > > So readers, can I assume noone has anything useful to add to why Tomcat
> > > produces: <html><body></body></html>

It might have nothing to do with it, but just yesterday I had Netscape6 produce that very page, when it shouldn't have. I was obtaining a personal certificate from Thawte and N6 gave me that output after installing the Cert. The certificate got installed, but the page source was precisely that.

Nix.

Re: Mozilla and Tomcat

Posted by Lloyd Llewellyn <su...@twilight-systems.com>.
> > So readers, can I assume noone has anything useful to add to why Tomcat
> > produces: <html><body></body></html>
> >
> 
> If you have a reproducible test case of this (or any other problem), the
> best thing to do is submit a bug report:

FWIW, I've experienced this several times using Tomcat.  It's always
involved a buggy servlet or Mozilla caching or something - fixing the
servlet and restarting Mozilla has always cleared it up.

I wish I could be more specific, but having recognized that the root
cause is an error in the servlet, it didn't concern me greatly and I
didn't pay much attention to it.

To the OP:  try restarting Mozilla and see if you get the same output.



Re: Mozilla and Tomcat

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 23 Aug 2001, John Baker wrote:

> Date: Thu, 23 Aug 2001 14:28:55 +0100
> From: John Baker <jb...@teamenergy.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: Mozilla and Tomcat
>
> So readers, can I assume noone has anything useful to add to why Tomcat
> produces: <html><body></body></html>
>
> for no apparent reason?
>

If you have a reproducible test case of this (or any other problem), the
best thing to do is submit a bug report:

  http://nagoya.apache.org/bugzilla/

and add your test case as an attachment.  That way, the developers will be
able to see exactly what you are talking about, and investigate the
underlying cause.

FWIW, I've never seen this kind of behavior on any version of Tomcat, with
any browser that *I've* ever used.  That's why we need a test case :-).

Craig


Mozilla and Tomcat

Posted by John Baker <jb...@teamenergy.com>.
So readers, can I assume noone has anything useful to add to why Tomcat 
produces: <html><body></body></html>

for no apparent reason?

On Wednesday 22 August 2001 14:42 pm, you wrote:
> 4.0b7 works fine for me. You might want to try it with the example jsps.
> Try this,
>
> 1. Add the following lines to the top of one of the examples (i.e. Snoop)
>
> response.setHeader("Pragma", "No-cache");
> response.setDateHeader("Expires", 0);
> response.setHeader("Cache-Control", "no-cache");
>
>     2. Clear your browser cache
>
>     3. Test the example and see whether you are still having the issue. I
> have used netscape and ie successfully against Tomcat 4.0b7 without seeing
> this type of problem.
>
>
> ____________________Reply Separator____________________
> Subject:    Re: Re[2]: Re[2]: Mozilla and Tomcat
> Author: tomcat-user@jakarta.apache.org
> Date:       8/22/2001 1:23 PM
>
> On Wednesday 22 August 2001 00:38 am, you wrote:
> > It sounds like a problem in your jsp or servlet.
> >
> > It looks like your response is not being truncated, since you get your
> > </html> tag. Make sure to flush the output stream before closing it in
> > servlets. Also, you might want to check whether you are using
> > page.forward since this will replace the response with the forwarded page
> > response. Without seeing your servlet or jsp, It's difficult to help
> > further.
>
> No, it's not. The jsp/servlets are fine. It's only when tomcat rebuilds the
> jsp class from the jsp page when it changes. After a few refreshes, it
> works, and then works for good (until I change it).
>
> > What version of Tomcat are you running. You should be running either
> > 3.2.3 if you are using the 3.2 branch,  some version of 3.3, or 4.0b7
> > which would be best.
>
> 4.0beta7
>
> > ____________________Reply Separator____________________
> > Subject:    Re: Re[2]: Mozilla and Tomcat
> > Author: tomcat-user@jakarta.apache.org
> > Date:       8/21/2001 11:45 PM
> >
> > Hello.
> >
> > We're getting off topic here. I have caching turned offf, however why
> > would mozilla print <html><body></body></html> when the JSP page doesnt
> > produce that (well it does, but with a load of other stuff in there!). I
> > can understand it caching pages, but not a page that has never been
> > produced.
> >
> > Tomcat must be doing something odd. Perhaps it is indeed returning just:
> >
> > <html><body></body></html> when it's rebuilt a page recently?
> >
> > I dunno, but it's a server problem not a caching problem IMHO.
> >
> >
> > John
> >
> > On Tuesday 21 August 2001 23:28 pm, you wrote:
> > > You can force the response to not be cached by the browser and proxy
> > > servers by setting headers in your jsp response before writing your
> > > html response header. Make sure to explicitly clear your browser cache
> > > once after doing this to get rid of any latent cached pages.
> > >
> > > response.setHeader("Pragma", "No-cache");
> > > response.setDateHeader("Expires", 0);
> > > response.setHeader("Cache-Control", "no-cache");
> > >
> > > ____________________Reply Separator____________________
> > > Subject:    Re: Mozilla and Tomcat
> > > Author: tomcat-user@jakarta.apache.org
> > > Date:       8/21/2001 1:55 PM
> > >
> > > At 01:50 PM 8/21/2001, you wrote:
> > > >I've ran into similar problems with Internet Explorer. Not exactly
> > > > though. Basically, I've seen IE display a cached page, even if you
> > > > have caching turned off. What I do is completely exit and restart my
> > > > browser each time I test a change to a servlet.
> > >
> > > Yeah, IE has a wicked sticky cache.

-- 
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com/)
The views expressed in this mail are my own.

Re: Re[2]: Re[2]: Re[2]: Mozilla and Tomcat

Posted by John Baker <jb...@teamenergy.com>.
On Wednesday 22 August 2001 14:42 pm, you wrote:
> 4.0b7 works fine for me. You might want to try it with the example jsps.
> Try this,
>
> 1. Add the following lines to the top of one of the examples (i.e. Snoop)
>
> response.setHeader("Pragma", "No-cache");
> response.setDateHeader("Expires", 0);
> response.setHeader("Cache-Control", "no-cache");
>
Already doing that.

>     2. Clear your browser cache

It really don't think it's the cache. How on earth would 
<html><body></body></html> get intot he cache when the page was previously 
full of stuff. No, it's not my jsp, the same thing happens most of the time 
when pages recompiled.

>     3. Test the example and see whether you are still having the issue. I
> have used netscape and ie successfully against Tomcat 4.0b7 without seeing
> this type of problem.
>

Try Mozilla 0.9.3.

> ____________________Reply Separator____________________
> Subject:    Re: Re[2]: Re[2]: Mozilla and Tomcat
> Author: tomcat-user@jakarta.apache.org
> Date:       8/22/2001 1:23 PM
>
> On Wednesday 22 August 2001 00:38 am, you wrote:
> > It sounds like a problem in your jsp or servlet.
> >
> > It looks like your response is not being truncated, since you get your
> > </html> tag. Make sure to flush the output stream before closing it in
> > servlets. Also, you might want to check whether you are using
> > page.forward since this will replace the response with the forwarded page
> > response. Without seeing your servlet or jsp, It's difficult to help
> > further.
>
> No, it's not. The jsp/servlets are fine. It's only when tomcat rebuilds the
> jsp class from the jsp page when it changes. After a few refreshes, it
> works, and then works for good (until I change it).
>
> > What version of Tomcat are you running. You should be running either
> > 3.2.3 if you are using the 3.2 branch,  some version of 3.3, or 4.0b7
> > which would be best.
>
> 4.0beta7
>
> > ____________________Reply Separator____________________
> > Subject:    Re: Re[2]: Mozilla and Tomcat
> > Author: tomcat-user@jakarta.apache.org
> > Date:       8/21/2001 11:45 PM
> >
> > Hello.
> >
> > We're getting off topic here. I have caching turned offf, however why
> > would mozilla print <html><body></body></html> when the JSP page doesnt
> > produce that (well it does, but with a load of other stuff in there!). I
> > can understand it caching pages, but not a page that has never been
> > produced.
> >
> > Tomcat must be doing something odd. Perhaps it is indeed returning just:
> >
> > <html><body></body></html> when it's rebuilt a page recently?
> >
> > I dunno, but it's a server problem not a caching problem IMHO.
> >
> >
> > John
> >
> > On Tuesday 21 August 2001 23:28 pm, you wrote:
> > > You can force the response to not be cached by the browser and proxy
> > > servers by setting headers in your jsp response before writing your
> > > html response header. Make sure to explicitly clear your browser cache
> > > once after doing this to get rid of any latent cached pages.
> > >
> > > response.setHeader("Pragma", "No-cache");
> > > response.setDateHeader("Expires", 0);
> > > response.setHeader("Cache-Control", "no-cache");
> > >
> > > ____________________Reply Separator____________________
> > > Subject:    Re: Mozilla and Tomcat
> > > Author: tomcat-user@jakarta.apache.org
> > > Date:       8/21/2001 1:55 PM
> > >
> > > At 01:50 PM 8/21/2001, you wrote:
> > > >I've ran into similar problems with Internet Explorer. Not exactly
> > > > though. Basically, I've seen IE display a cached page, even if you
> > > > have caching turned off. What I do is completely exit and restart my
> > > > browser each time I test a change to a servlet.
> > >
> > > Yeah, IE has a wicked sticky cache.

-- 
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com/)
The views expressed in this mail are my own.