• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there an inherent delay in all .jsp files?

 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a .jsp doesn't have any jsp tags in it, will the server pump it out slower then a strict .html file?

[Bear edit: fixed typo in subject]
[ October 03, 2005: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it has a .jsp extension, it will be translated into servlet code and then compiled, so... yes.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But that will of course only happen on the first access of a JSP. Once translated to a servlet, the servlet will be executed without re-translation on subsequent hits (unless the JSP has been modified, of course).
[ October 03, 2005: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was just about to add that...
Depending on the circumstances, the compiled servlet, filled with println statements may actually be faster than an HTML file if the latter always needs to be read from disk.
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help! Things are alot clearer to me now.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you first time make a request for JSP, it will compile it and convert it in to the Servlet.

For the further request for the same JSP, application server will check whether JSP has changed after Servlet generated or not. If it has changed then it will again compile the Servlet, else execute the existing Servlet.

This process involves IO and it consumes time � a tiny amount but if you aggregate, it becomes significant.

In WebLogic you have option where by you turn off this option, and it will not check for the new version of JSP for each request. And whenever you update any JPS, you just have to restart the server.

I guess by turning of this option you can avoid some amount of delay, but don�t expect drastic performance gain by doing this.

Normally in development environment it should check with each request and in production environment it should check after each restart only.
[ October 04, 2005: Message edited by: Chetan Parekh ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!