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.
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.
Reported to the Glassfish Ref Impl as: https://glassfish.dev.java.net/issues/show_bug.cgi?id=2615 Closing this issue as WONTFIX.