Nikolaos,

If you are using JSP as a view technology in an MVC pattern, then IMO you 
should not want to use scriptlets in you're JSP. Because what ever you want 
to do in a scriptlet is the responsibility of the controller a.k.a. Action 
Bean. Seen this way, it's actually a good thing that JSP tag files enforce 
the MVC pattern boundaries.

The major benefit of JSP tag files is that they stream their output as it 
comes available. The Stripes layout tags, does not seem to do this (I think 
it starts streaming after the whole layout is out evaluated). This will slow 
down perceived performance of you're website, especially on complex or big 
pages.

The drawback of JSP tag files is that they only have one body. But a Stripes 
layout tag can have multiple body parts (named layout components). This is a 
more flexible way of declaring templates and I did not yet find a good 
replacement for doing this just as good with JSP tag files. The JSP tag 
files thus result in a less flexible template structure.



Karen



"Nikolaos Giannopoulos" <nikol...@brightminds.org> 
wrote in message news:4be24d0f.5050...@brightminds.org...
> Will,
>
> Thanks for the input.  This caught my attention about at least one
> particular benefit of Stripes Layout over Tag Files:
>
> http://www.stripesframework.org/display/stripes/Layout+Reuse
>
> *Page fragment layouts
> *
> This might be obvious, but you can also use a layout to control how a
> small piece of a page renders. Using the layout tags in this way is very
> similar to using the new JSP tag files which allow you to write custom
> tags using JSP fragments. /_With on important difference. While you can
> pass the result of JSP fragments to a tag file, those fragments cannot
> contain any scriptlets._/ Often this isn't a problem, but sometimes it
> can get in the way.
>
> It remains to be seen (yet) if this benefit will matter much in our case
> though I am curious if anyone end up using Stripes Layout over JSP tag
> files b/c of this???  And why?  An example is cited at the URL above but
> I doubt I would ever want to do anything like that.
>
> --Nikolaos
>
>
>
> Will Hartung wrote:
>> Nikolaos,
>>
>> I can't comment on Stripes Layout memory consumption, nor the use of 
>> Tiles.
>>
>> I can only follow up with what Richard said about JSP 2.0 Tag Files.
>>
>> I've not used Tiles or Stripes Layout simply because Tag Files exist, and 
>> I use those instead.
>>
>> JSP Tag Files effectively are as memory efficient (or inefficient) as JSP 
>> pages are themselves, since that's effectively all they are -- JSP files 
>> converted to code and dynamically run at page render time.
>>
>> Tag Files allow for ready refactoring and adding the right amount of 
>> abstractions to your JSPs.
>>
>> Regards,
>>
>> Will Hartung
>>
>>
>


--------------------------------------------------------------------------------


> ------------------------------------------------------------------------------
>


--------------------------------------------------------------------------------


> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
> 




------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to