tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <rahul.akol...@gmail.com>
Subject Re: question about tags and includes
Date Tue, 03 May 2005 17:59:15 GMT
Sent this email few hours ago, but it didn't make it to the list, so
re-trying (sorry!)

On 5/3/05, luca passani <passani@eunet.no> wrote:
<snip/>
> OK, I buy it that this is an explanation of why includes of non well-formed tags don't
work.
> 
> Questions:
> 
> - isn't this a pointless limitation? are there real technical reasons for this?
> 
> - this should be more prominently documented in the JSP specs, IMO. I must have reads
>  descriptions like the one you posted tens of times and I never interpreted that
>  to mean that included JSP files need be well-formed XML
> 

Spec related questions/comments will be best addressed in the
appropriate forum i.e. jsp-spec-public [
https://jsp-spec-public.dev.java.net/ ]

I think of includes as independent compilation (if needed) units.
Custom tags are more concise, better maintained and nest, validate
more easily compared to includes for the kind of end effect you're
trying to achieve i.e. instead of:

<%@ include file="start_a_tag.inc" %>
 <tag:b/>
<%@ include file="end_a_tag.inc" %>

I'd author a wrapper tag like so:

<my:wrapper>
<tag:b/>
</my:wrapper>

where wrapper.tag looks like:

<%-- taglib, attr, page decls, JSP elements, template text etc. as needed --%>
<tag:a>
  <%-- you could do more with jsp:doBody --%>
  <jsp:doBody />
</tag:a>
<%-- remaining JSP elements, template text etc. --%>

And, this implies JSP 2.0 ;-) Let me know how it goes.

-Rahul

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


Mime
View raw message