Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP not refreshing

 
Zip Ped
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64847
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64847
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64847
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
pankaj patil
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • 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
 
Gonzalo Nadal
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic