Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disadvantages of scriptlets in JSP

 
Sai Surya
Ranch Hand
Posts: 463
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am aware that JSP will be translated into Java. I read somewhere that using scriptlets in JSP will have performance impact. I do not understand how this can impact performance?

Since JSP will be converted to .java file anyway, if we use scriplets in JSP we are infact "saving" the compilation time (JSP to .java). This should rather be a performance improvement.

If we purely use tags (for example, JSTL) the conversion to .java is still required.

Please help me to understand this.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Performance has nothing to do with the decision not to use scriptlets.

We avoid using them because they're ugly.
For a real good and detailed explanation of this ugliness read
this article by Bear Bibeault.
 
Sai Surya
Ranch Hand
Posts: 463
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. It really helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic