Bug 39719

Summary: JstlCoreTLV is too strict in its requirements
Product: Taglibs Reporter: james.a.rosen
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P2    
Version: 1.2.0   
Target Milestone: ---   
Hardware: All   
OS: Mac OS X 10.4   

Description james.a.rosen 2006-06-05 05:17:23 UTC
Lines 194 and following of org.apache.taglibs.standard.tlv.JstlCoreTLV read as

// check constraints for <param> vis-a-vis URL-related tags
if (isCoreTag(ns, ln, PARAM)) {
  // no <param> outside URL tags.
  if (urlTags.empty() || urlTags.peek().equals(PARAM))
    fail(Resources.getMessage("TLV_ILLEGAL_ORPHAN", PARAM));

This is too strict.  The class
org.apache.taglibs.standard.tag.common.core.ParamSupport only requires that its
parent implement ParamParent, not actually be a c:url tag.  With the TLV as is,
I cannot write another tag of my own that relies on c:param tags internally.
Comment 1 Henri Yandell 2006-12-06 16:21:18 UTC
Looking at the code, relaxing this isn't very simple as we're not at the object
level. Instead we're parsing XML in SAX, so it's not known that the allowed
"param" parents of "url", "import" and "redirect" all implement ParamParent.

There's no change to the spec in 1.2 on the c:param page, so nothing to be
learnt there.

The choice seems to me to be either to remove the TLV check for the parent of
c:param or to recommend that people create their own *:param tags by extending
the ParamTag implementations. 

My suggestion is that we do the latter while bringing the former up as an issue
for the expert group.
Comment 2 Henri Yandell 2007-03-14 16:33:41 UTC
Reported to the Glassfish Ref Impl as:


Closing this issue as WONTFIX.