File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes changes in jsp not reflecting immediately Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "changes in jsp not reflecting immediately" Watch "changes in jsp not reflecting immediately" New topic
Author

changes in jsp not reflecting immediately

Latha Reddy
Greenhorn

Joined: Aug 14, 2003
Posts: 12
Hi all,
One of my client needs me to use Tomcat 5.0(as they already have the product almost finished on this version) They have got quite few problems..

The first problem i have is... When I do any change to the jsp file and try to access it from the browser, changes are not reflecting immediately and taking some time, eg, changes like changing the page title is also taking a while to reflect in the browser window. I am not using any jsp precompiler in this case. Even when i tried the same thing and precompiled with Ant, the result is still the same.
The changes are immediate only if i restart the tomcat service.

I shall be glad if some body could help on this...

Is it something to do with Tomcat settings or any cache??

Thanks very much
Latha
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are you in a different timezone from your client?
Is the clock on the client's machine off?

Tomcat compares the dates of the JSP source files with the compiled servlet code to see if there has been a change since it was last compiled.

If the server has a later time than your machine, your JSP file might not ever look newer than the generated class file.

The Unix touch command is useful in this regard. Another option is to change the clock on your machine when working with this client's machine.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Latha Reddy
Greenhorn

Joined: Aug 14, 2003
Posts: 12
Thanks very much for your reply, Ben.

Right now I'm testing with tomcat installed on my local machine, and i am changing the jsps on the same machine. So i'm sure it is not the problem with any time differences.

I also noticed, it is taking an approximate of 5 mins. to reflect the changes.

Any ideas?? please help.

Thanks
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are you sure the pages aren't being cached in your browser?

One trick that I use to test is to type the address in with a bogus querystring parameter to insure a unique URL.

http://localhost:8080/testpage.jsp?asdf=fdsa

If changing the URL displays the changes correctly, then the problem is in your browser.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changes in jsp not reflecting immediately
 
Similar Threads
Apche-tomcat refresh page problem...pls help urgent
JSP recompile confusion
changes in jsp not reflecting immediately
JSP turning into Servlet
Always have to restart MyEclipse just to reflect changes in jsp