Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Question about JSP page compilation

 
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • 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 VI Editor Ubuntu
  • 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.
 
What? What, what, what? What what tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic