Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about JSP page compilation

 
liao Yang
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

The HFSJ says that a jsp page is translated and compiled only once in its life time when the first request to the page is received. I believe the "lif time" means from the container's start-up to its shutdown.

After restarting, the jsp page is compiled again for the first request. Am I right?

Thank you very much.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that containers are more clever than that. They probably look at the timestamp to check if the file has changed or not. Even if you restart the container, I don't think it will cause all jsps that you access to be recompiled.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Christophe Verre:
They probably look at the timestamp to check if the file has changed or not.


can i know that from where the container looks for timestamp ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from where the container looks for timestamp ?

What do you mean by "from where" ? It compares the timestamp of both the jsp file and the generated class file. For example, here's an articleon how Tomcat decides whether to recompile or not.
 
liao Yang
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Christophe. Understand it now, I also check out the article you recommended, it's good.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic