Bug 39719 - JstlCoreTLV is too strict in its requirements
Summary: JstlCoreTLV is too strict in its requirements
Status: RESOLVED WONTFIX
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.2.0
Hardware: All Mac OS X 10.4
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-05 05:17 UTC by james.a.rosen
Modified: 2007-03-14 16:33 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description james.a.rosen 2006-06-05 05:17:23 UTC
Lines 194 and following of org.apache.taglibs.standard.tlv.JstlCoreTLV read as
follows:

---
// 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:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=2615

Closing this issue as WONTFIX.