Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Modified Jsp  RSS feed

 
Chhaya Dhanani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
It is understood that the container checks the last modified timestamp for a jsp page and then loads it. Which means, if i modify a jsp today, which was written and tested yesterday, the container will check for the lastmodifiedDate and recompile the jsp to give new output.
This works fine.

Suppose i back date the system date and change the jsp, the new output is not shown..
Does this mean, that the web container only checks for the timestamp and has no other way of knowing that a jsp page has been modified??

is it then not a danger that my new jsp pages will not come into effect, in case i back date my system..???

How does the container handle this?

Any inputs will be highly appreciated.

Thanx in advance,
Chhaya
 
Rohit Ahuja
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chay,
The container is least bothered about timestamps.From my understanding every JSP page is compiled whenever it is changed. The timestamp of the JSP hardly matters.It is the containers problem, it compares the jsp with the already compiled servlet to check for differences whenever it is turned on. Probably the first hit takes time for the very same reason that it gets recompiled.
Shoot if u have any more questions.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether JSPs get recompiled, and indeed how the container detects the change, is container specific. Having said that, none of the containers I'm familiar with actually compare the JSP contents; they simply detect changes in the last modified time.

- Peter
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ummm, what Peter said.

Additionally, if you "lie" to the container by changing system times on it, you can't really expect reasonable behavior, can you?

Deepak, what containers do you know of that actually compare contents? Or are you speaking out of your hat?
[ June 07, 2004: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!