• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP not refreshing

 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using a JSP which does not pick up changes when I do a refresh in IE. I am using Tomcat 5.0. I read in one forum that this problem could be because of some static code inside my JSP.

I cleared the history, deleted all cookies and cleared my cache and it still didnt work.

In order for it to pick up changes, I have to delete the file from my jsp folder and then do a refresh till the page is not found, then copy the file back to the folder and then access it.

Could anyone tell me if this is a problem with tomcat or is there something I am missing?

Thanks
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Kailash",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
[ December 08, 2005: Message edited by: Bear Bibeault ]
 
Zip Ped
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am sorry for that. I thought I could just use my first name. I'll make sure I'll add my last name in there too.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The browser is probably pulling the page from cache. I know you said you cleared the cache, but that's an iffy proposition.

Search this, and perhaps the servlets forum, for topics on cache and caching. You will find lots of good information.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kailash:
I am sorry for that. I thought I could just use my first name. I'll make sure I'll add my last name in there too.



No problem. Thank you for your prompt compliance.
[ December 08, 2005: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing that can cause this is a system clock being off.
Tocmat will check each JSP to see if the generated code and class are older than the source file. If so, it will regenerate.
I've had new JSPs not get compiled after moving them to a server in another time zone.

Deleting the tomcat/work directory will force Tomcat to recompile all JSPs.
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I may be wrong but this can be one of the solution of not caching the jsp pages
<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0);
//prevents caching at the proxy server
%>

Insert this code in the your jsp page

With Regards
Pankaj
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As pankaj patil say, this must make your browser refresh your jsps.

Remember include in the jsp that load in iframes.
[ December 09, 2005: Message edited by: Gonzalo Nadal ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic