aspose file tools*
The moose likes JSP and the fly likes JSP not refreshing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP not refreshing " Watch "JSP not refreshing " New topic
Author

JSP not refreshing

Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
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

Joined: Jan 10, 2002
Posts: 61654
    
  67

"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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
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

Joined: Jan 10, 2002
Posts: 61654
    
  67

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

Joined: Jan 10, 2002
Posts: 61654
    
  67

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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
pankaj patil
Ranch Hand

Joined: Dec 19, 2004
Posts: 98
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


Regards,
Pankaj Patil
Gonzalo Nadal
Greenhorn

Joined: Dec 08, 2005
Posts: 15
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 ]

L'essentiel est invisible pour les yeux.(Le petit prince)
What is essential is invisible to the eyes.(The Little Prince)
Lo esencial es invisible a los ojos. (El principito)
 
 
subject: JSP not refreshing