• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP

 
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As we know that JSP page is translated and compiled at first client request usually.Does this happen at every time when Container is started and a client requests the JSP?If not then how Container figures out whether there has been a change in it since last time?
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i guess, that the container figures out the source code changes though the timestamp comparison on source code and the compiled code (.class). The compiled code(.class) should have a higher timestamp than the source code( i.e. JSP file).

But this behaviour is not certainly implemented. And sometimes we have to mannually delete the source code (.java) and the compiled code (.class) to get the latest changes.
 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much but what is timestamp?
 
lalit upadheyay
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
timestamp is the latest file modification time. which it compares both for the .JSP file and .class file corresponding it.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think, If you change the code in JSP and next time you issue a request for execution,the JSP goes thru all the phases like translation, compilation and loading and instantiation of the servlet class generated by the JSP engine.
[ December 12, 2005: Message edited by: sriRam gaddaM ]
 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But SriRam don't you think it would be performance prone if we have say 1000 JSPs?
 
lalit upadheyay
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, the container should go through all the stages but it doesn't. I faced this problem yesterday evening when i changed a hardcoded request paramter in jsp file and forwarded it to another page to access there, but it reflected me old values even when i restarted tomcat. I was working on tomcat 5.0.19 on windows platform.
 
reply
    Bookmark Topic Watch Topic
  • New Topic