You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Ciramella, EJ" <EC...@emptoris.com> on 2003/02/19 17:12:41 UTC

Benefits of using taglibs...

My company has ~500 jsps - all of which are scriptlet heavy.  I want to
propose a change to using taglibs (either custom or directly from the taglib
project).  What can I site as the benefits?  I'm hoping to find a web page
or document or something that clearly states some sort of performance
increase.  Currently, it takes a REALLY long time just to load the login
page (which has large scriptlets embedded and it's imports also are 90%
scriptlet).  I'm guessing that if these things were compiled classes in side
a taglib, this would shorten load time and lessen the need to precompile the
jsp's.
 
Thanks in advance.

RE: Benefits of using taglibs...

Posted by "O'brien, Tim" <to...@transolutions.net>.
> -----Original Message-----
> From: Shawn Bayern [mailto:bayern@essentially.net] 
> 
> On Wed, 19 Feb 2003, Ciramella, EJ wrote:
> 
> > My company has ~500 jsps - all of which are scriptlet 
> heavy.  I want 
> > to propose a change to using taglibs (either custom or 
> directly from 
> > the taglib project).  What can I site as the benefits?  I'm 
> hoping to 
> > find a web page or document or something that clearly 
> states some sort 
> > of performance increase.  Currently, it takes a REALLY long 
> time just 
> > to load the login page (which has large scriptlets embedded 
> and it's 
> > imports also are 90% scriptlet).  I'm guessing that if these things 
> > were compiled classes in side a taglib, this would shorten 
> load time 
> > and lessen the need to precompile the jsp's.
> >
> >  Thanks in advance.
> 
> The benefits of tag libraries are primarily organizational.  
> You're unlikely to notice a performance improvement when 
> switching from scriptlets to tag libraries; your scriptlet 
> code is being compiled into servlets before it's run.
> 

You may notice a speed up relating to page compilation, but Shawn is right
when he states that tag libraries don't necessarily mean improved
performance.  I'd imagine that your performance issues might be a product of
a larger architectural issue.  If your application consists solely of JSP w/
scriptlets, you might not be taking advantage of pooled JDBC connections,
caching, etc..

I'd recommend an evolutionary approach, the first step involves taglibs.

1. JSP w/ Scriptlets  *Uck!*
2. JSP w/ Custom Taglibs and JSTL
3. JSP w/ Custom Taglibs and JSTL - accessing a shared "persistence" layer (
see OJB, Hibernate, etc.. )
4. JSP w/ Custom Taglibs and JSTL + Struts for MVC - both interfacing with
shared persistence layer

The benefits of the jump between #1 and #2 are mostly maintainability and
reuse.
Performance gains will start to manifest themselves when you make the jump
between #2 and #3.

> -- 
> Shawn Bayern
> "JSTL in Action"   http://www.manning.com/bayern
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Benefits of using taglibs...

Posted by Shawn Bayern <ba...@essentially.net>.
On Wed, 19 Feb 2003, Ciramella, EJ wrote:

> My company has ~500 jsps - all of which are scriptlet heavy.  I want
> to propose a change to using taglibs (either custom or directly from
> the taglib project).  What can I site as the benefits?  I'm hoping to
> find a web page or document or something that clearly states some sort
> of performance increase.  Currently, it takes a REALLY long time just
> to load the login page (which has large scriptlets embedded and it's
> imports also are 90% scriptlet).  I'm guessing that if these things
> were compiled classes in side a taglib, this would shorten load time
> and lessen the need to precompile the jsp's.
>
>  Thanks in advance.

The benefits of tag libraries are primarily organizational.  You're
unlikely to notice a performance improvement when switching from
scriptlets to tag libraries; your scriptlet code is being compiled into
servlets before it's run.

-- 
Shawn Bayern
"JSTL in Action"   http://www.manning.com/bayern


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org