You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Adress, David S." <Da...@pfizer.com> on 2000/12/08 14:29:21 UTC

$20 bucks to the 1st person who actually solves my problem!!!

I am on this for days and I can't figure out what I'm doing wrong. I will
send $20 bucks to 1st person who actually solves my problem.

I am using jsp page's to control the layout of my page and servlets to spit
back 
table data or to do database transactions.

I have a jsp page that displays a list of employees. The jsp page
has an include statement to include the servlet to spit out the table.
The jsp just handles the general look of the page and the servlet just 
spits out the table and table html tags. Next to each record I have an add
and 
delete hyperlink. If someone clicks the add link it displays another page to
add 
an employee and then the action servlet adds the record and then goes back
to the jsp 
list page. If some one deletes a record it calls a servlet to delete and
then the servlet redirects back to the jsp list page. But the list doesn't
display the updated data without having me hit the refresh button in the
browser.

I tried using Tomcat and now am using Jrun and am still having the same
problem.

I've included all the proper meta tags in the jsp list page not to cache but
it's not working. I've also tries doing it with reponse.setHeader but it
doesn't work either.

I've tried sending a random number param to the page
ShowList?rnd=Randomnumber it still doesn't work.



Re: $20 bucks to the 1st person who actually solves my problem!!!

Posted by Chad Reese <cr...@presideo.com>.
Try this in your servlet:
                    res.setIntHeader("Expires", 0);
                    res.setHeader("Cache-Control", "no-cache");

And this in the page source:
    <META HTTP-EQUIV="cache-control" CONTENT="no-cache">
    <META HTTP-EQUIV="expires" CONTENT="0">

IE ignores the cache directives but seems to respect the Expires header. Both of

the above probably aren't necessary but they don't hurt. Hope this helps.

Chad

P.S. Help is free but the title did get my attention :-)

"Adress, David S." wrote:

> I am on this for days and I can't figure out what I'm doing wrong. I will
> send $20 bucks to 1st person who actually solves my problem.
>
> I am using jsp page's to control the layout of my page and servlets to spit
> back
> table data or to do database transactions.
>
> I have a jsp page that displays a list of employees. The jsp page
> has an include statement to include the servlet to spit out the table.
> The jsp just handles the general look of the page and the servlet just
> spits out the table and table html tags. Next to each record I have an add
> and
> delete hyperlink. If someone clicks the add link it displays another page to
> add
> an employee and then the action servlet adds the record and then goes back
> to the jsp
> list page. If some one deletes a record it calls a servlet to delete and
> then the servlet redirects back to the jsp list page. But the list doesn't
> display the updated data without having me hit the refresh button in the
> browser.
>
> I tried using Tomcat and now am using Jrun and am still having the same
> problem.
>
> I've included all the proper meta tags in the jsp list page not to cache but
> it's not working. I've also tries doing it with reponse.setHeader but it
> doesn't work either.
>
> I've tried sending a random number param to the page
> ShowList?rnd=Randomnumber it still doesn't work.

--
Chad Reese
Software Engineer
Presideo

Phone: 561 - 581 - 7079
Email: mailto:creese@presideo.com



RE: $20 bucks to the 1st person who actually solves my problem!!!

Posted by Michael Remijan <re...@dchain.com>.
David,

This might be worth a shot.  in the page you want reloaded, try adding in
this
<head>
<META HTTP-EQUIV = "Pragma" CONTENT="no-cache">
</head>

this meta tag forces no cache of the page so it is suppose to be refreshed
from the server everytime.  Let me know if this help.

Mike


> -----Original Message-----
> From: Adress, David S. [mailto:David.S.Adress@pfizer.com]
> Sent: Friday, December 08, 2000 7:29 AM
> To: 'tomcat-user@jakarta.apache.org'; 'JRun-Talk'
> Subject: $20 bucks to the 1st person who actually solves my problem!!!
>
>
> I am on this for days and I can't figure out what I'm doing wrong. I will
> send $20 bucks to 1st person who actually solves my problem.
>
> I am using jsp page's to control the layout of my page and
> servlets to spit
> back
> table data or to do database transactions.
>
> I have a jsp page that displays a list of employees. The jsp page
> has an include statement to include the servlet to spit out the table.
> The jsp just handles the general look of the page and the servlet just
> spits out the table and table html tags. Next to each record I have an add
> and
> delete hyperlink. If someone clicks the add link it displays
> another page to
> add
> an employee and then the action servlet adds the record and then goes back
> to the jsp
> list page. If some one deletes a record it calls a servlet to delete and
> then the servlet redirects back to the jsp list page. But the list doesn't
> display the updated data without having me hit the refresh button in the
> browser.
>
> I tried using Tomcat and now am using Jrun and am still having the same
> problem.
>
> I've included all the proper meta tags in the jsp list page not
> to cache but
> it's not working. I've also tries doing it with reponse.setHeader but it
> doesn't work either.
>
> I've tried sending a random number param to the page
> ShowList?rnd=Randomnumber it still doesn't work.
>
>
>


RE: $20 bucks to the 1st person who actually solves my problem!!!

Posted by Chris Stratton <ch...@ppws.com>.
Save your money - if this works, fine. I've had the same problems a time or
two myself.

First, try putting the meta tags at the end of the page as well as at the
start - something about the way the browsers process the information... I
don't know. I do it, it helps. Secondly, keeping in mind that a redirect is
a browser function and if the above is ineffective, rewrite the page logic
to perform the delete and then spit out the HTML from the display page, as
opposed to redirecting to it.

Hoping this helps,

Chris.

-----Original Message-----
From: Adress, David S. [mailto:David.S.Adress@pfizer.com]
Sent: Friday, 8 December 2000 11:29 PM
To: 'tomcat-user@jakarta.apache.org'; 'JRun-Talk'
Subject: $20 bucks to the 1st person who actually solves my problem!!!


I am on this for days and I can't figure out what I'm doing wrong. I will
send $20 bucks to 1st person who actually solves my problem.

I am using jsp page's to control the layout of my page and servlets to spit
back
table data or to do database transactions.

I have a jsp page that displays a list of employees. The jsp page
has an include statement to include the servlet to spit out the table.
The jsp just handles the general look of the page and the servlet just
spits out the table and table html tags. Next to each record I have an add
and
delete hyperlink. If someone clicks the add link it displays another page to
add
an employee and then the action servlet adds the record and then goes back
to the jsp
list page. If some one deletes a record it calls a servlet to delete and
then the servlet redirects back to the jsp list page. But the list doesn't
display the updated data without having me hit the refresh button in the
browser.

I tried using Tomcat and now am using Jrun and am still having the same
problem.

I've included all the proper meta tags in the jsp list page not to cache but
it's not working. I've also tries doing it with reponse.setHeader but it
doesn't work either.

I've tried sending a random number param to the page
ShowList?rnd=Randomnumber it still doesn't work.