Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

changes in jsp not reflecting immediately

 
Latha Reddy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Latha Reddy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic