----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

1. If I remember correctly: headers only affect output if the output is buffered and 
then written to stream.
2. In Explorer there is an issue where no tags in the world will prevent caching 
unless you use double(yes)
<head>-tags with metatahs like "no-cache" etc. This is documented on microsoft.com and 
I have first hand experienced
from it.
The second  <head> with meta-tags should be last in file before </html>
<html>
<head>
<meta .....
</head>

<body>
</body>

<head>
<meta ..........
</head>

</html>


HTH
//OLAS

Chris Cheshire wrote:

> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> I thought this might be the case too, but I am positive that all the
> HTML files the servlets read/redirect to have the headers (but I'll add
> the headers to the servlet just as a matter of course).
>
> Any one else have any suggestions?
>
> Thanks
> Chris
>
> [EMAIL PROTECTED] wrote:
> >
> > ----------------------------------------------------------------
> > BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> > WHEN YOU POST, include all relevant version numbers, log files,
> > and configuration files.  Don't make us guess your problem!!!
> > ----------------------------------------------------------------
> >
> > We had the exact same situation in our application.  In our case, the
> > problem/resolution
> > involved caching proxy servers that our clients go through.  These servers
> > do caching
> > based on URI and not cookies --so, if you have a page with a URI like
> > /servlets/mainpg,
> > the proxy will cache the first copy of /servlets/mainpg that it processes.
> > Subsequent
> > client requests for /servlet/mainpg will receive in response the cached
> > copy.
> >
> > The fix is to include:
> >
> >      response.setHeader( "Cache-Control", "no-cache" );
> >      response.setHeader( "Pragma", "no-cache" );
> >
> > in all the servlets/JSPs that send HTML to clients.
> >
> > So, assuming the problem is not in your cookie-handling code, I would say
> > this is
> > the most likely cause.
> >
> > - Fernando
> >
> > |--------+----------------------------------------->
> > |        |          Chris Cheshire                 |
> > |        |          <[EMAIL PROTECTED]>     |
> > |        |          Sent by:                       |
> > |        |          <[EMAIL PROTECTED]|
> > |        |          -dogs.com>                     |
> > |        |                                         |
> > |        |                                         |
> > |        |          01/11/2001 08:40 PM            |
> > |        |          Please respond to "Java Apache |
> > |        |          Users"                         |
> > |        |                                         |
> > |--------+----------------------------------------->
> >   
>>------------------------------------------------------------------------------------------------------------|
> >   |                                                                                
>                            |
> >   |       To:     Java Apache Users <[EMAIL PROTECTED]>      
>                            |
> >   |       cc:                                                                      
>                            |
> >   |       Subject:     servlets and user tracking                                  
>                            |
> >   
>>------------------------------------------------------------------------------------------------------------|
> >
> > ----------------------------------------------------------------
> > BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> > WHEN YOU POST, include all relevant version numbers, log files,
> > and configuration files.  Don't make us guess your problem!!!
> > ----------------------------------------------------------------
> >
> > Hi,
> >
> > I am having ongoing problems relating to servlets and user information.
> >
> > I am running Apache 1.3.12, with Jserv 1.1.2, with JDK 1.2.2 on
> > Redhat linux 6.2.
> >
> > I have a servlet which takes a user's information and verifies it in the
> > database and when correct it sets a cookie on the user's computer with
> > the
> > person's associated customerid with our company. This cookie is
> > then checked for when other applications on our site need customer
> > information.
> > The value from this cookie is used to access the database again in
> > other servlets to retrieve further information from the web site.
> > When passing information around in a servlet while it is performing its
> > job for a user, I am using an instance of a specific helper class for
> > that
> > servlet and passing it about, rather than setting class wide variables
> > for
> > the servlet. We are getting member complaints that sometimes they are
> > not
> > viewing their own information. This means that for some reason the
> > servlet
> > is not reading their cookie but someone else's cookie. Either that or
> > instances
> > of the helper class that are being instantiated inside a service(),
> > doGet() or
> > doPost() are being confused with other instances when the servlet is
> > being hit
> > from multiple users at once.
> >
> > I used to have some of the common information from the database stored
> > in sessions
> > but the problem was even worse, because the session tracking was done by
> > cookies
> > and the wrong cookie would be retrieved somehow and then the wrong
> > information would
> > be retrieved from the session. Or, again it might be the instances of
> > the helper
> > class getting confused.
> >
> > Can someone shed some light on this please?
> >
> > Thanks
> >
> > Chris
> >
> > (PS I have even upgraded versions of the JDK while this has been
> > happening, to no
> > avail).
> >
> > --
> > Chris Cheshire
> > Manager of Software Development
> > bigredwire.com
> > Phone : +1 805 560 6666 (w)
> >         +1 805 559 9166 (m)
> > Fax :   +1 805 560 8901
> > Email : [EMAIL PROTECTED]
> >
> >    Real Programmers don't draw flowcharts.
> >    Flowcharts are the illiterate's form of
> >    documentation. Cavemen drew flowcharts;
> >    look at how much good it did for them
> >
> > --
> > --------------------------------------------------------------
> > Please read the FAQ! <http://java.apache.org/faq/>
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Search Archives:
> > <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> > Problems?:           [EMAIL PROTECTED]
> >
> > --
> > --------------------------------------------------------------
> > Please read the FAQ! <http://java.apache.org/faq/>
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Search Archives:
> > <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> > Problems?:           [EMAIL PROTECTED]
>
> --
> Chris Cheshire
> Manager of Software Development
> bigredwire.com
> Phone : +1 805 560 6666 (w)
>         +1 805 559 9166 (m)
> Fax :   +1 805 560 8901
> Email : [EMAIL PROTECTED]
>
>    Real Programmers don't draw flowcharts.
>    Flowcharts are the illiterate's form of
>    documentation. Cavemen drew flowcharts;
>    look at how much good it did for them
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search Archives:
> <http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to