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

JSP

 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
  • 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?
 
lalit upadheyay
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
sriRam gaddaM
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic