wood burning stoves 2.0*
The moose likes JSP and the fly likes Disadvantages of scriptlets in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Disadvantages of scriptlets in JSP" Watch "Disadvantages of scriptlets in JSP" New topic
Author

Disadvantages of scriptlets in JSP

Sai Surya
Ranch Hand

Joined: Feb 08, 2006
Posts: 457

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.


Sai Surya, SCJP 5.0, SCWCD 5.0, IBM 833 834
http://sai-surya-talk.blogspot.com, I believe in Murphy's law.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sai Surya
Ranch Hand

Joined: Feb 08, 2006
Posts: 457

Thank you. It really helped.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disadvantages of scriptlets in JSP
 
Similar Threads
tags over Scriptlets
how to use javascript and scrptlet simultaneously
TagLibs in JSP
Scriptlets
How are Standard bean action tags useful