} else {
// Attribute does not accept any expressions.
// Make sure its value does not contain any.
- if (isExpression(n, attrs.getValue(i))) {
- err .jspError(n, "jsp.error.attribute.custom.non_rt_with_expr",
+ if (isExpression(n, attrs.getValue(i),
+ !tagInfo.getTagLibrary().getRequiredVersion().equals("2.0"))) {
+ err.jspError(n, "jsp.error.attribute.custom.non_rt_with_expr",
tldAttrs[j].getName());
}
jspAttrs[i] = new Node.JspAttribute(tldAttrs[j],
* Checks to see if the given attribute value represents a runtime or EL
* expression.
*/
- private boolean isExpression(Node n, String value) {
+ private boolean isExpression(Node n, String value, boolean checkDeferred) {
if ((n.getRoot().isXmlSyntax() && value.startsWith("%="))
|| (!n.getRoot().isXmlSyntax() && value.startsWith("<%="))
|| (value.indexOf("${") != -1 && !pageInfo.isELIgnored())
- || (value.indexOf("#{") != -1 && !pageInfo.isELIgnored()
+ || (checkDeferred && value.indexOf("#{") != -1 && !pageInfo.isELIgnored()
&& !pageInfo.isDeferredSyntaxAllowedAsLiteral()))
return true;
else
String actionName) throws JasperException {
if (n.getAttributes() != null
&& n.getAttributes().getValue(attrName) != null
- && isExpression(n, n.getAttributes().getValue(attrName))) {
+ && isExpression(n, n.getAttributes().getValue(attrName), true)) {
err.jspError(n,
"jsp.error.attribute.standard.non_rt_with_expr",
attrName, actionName);