Author: markt
Date: Wed Sep 30 12:49:35 2015
New Revision: 1706017
URL: http://svn.apache.org/viewvc?rev=1706017&view=rev
Log:
Fix issue reported by violetagg during 8.0.27 vote.
Improve error message to include name of attribute.
Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1706017&r1=1706016&r2=1706017&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Wed Sep 30
12:49:35 2015
@@ -232,7 +232,7 @@ class Parser implements TagConstants {
}
watchString = watchString + quote;
- String attrValue = parseAttributeValue(watchString, ignoreEL);
+ String attrValue = parseAttributeValue(qName, watchString, ignoreEL);
attrs.addAttribute(uri, localName, qName, "CDATA", attrValue);
return true;
}
@@ -263,11 +263,11 @@ class Parser implements TagConstants {
* RTAttributeValueDouble ::= ((QuotedChar - '"')* -
((QuotedChar-'"')'%>"')
* ('%>"' | TRANSLATION_ERROR)
*/
- private String parseAttributeValue(String watch, boolean ignoreEL) throws
JasperException {
+ private String parseAttributeValue(String qName, String watch, boolean
ignoreEL) throws JasperException {
Mark start = reader.mark();
Mark stop = reader.skipUntilIgnoreEsc(watch, ignoreEL);
if (stop == null) {
- err.jspError(start, "jsp.error.attribute.unterminated", watch);
+ err.jspError(start, "jsp.error.attribute.unterminated", qName);
}
String ret = null;
Modified: tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=1706017&r1=1706016&r2=1706017&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Wed
Sep 30 12:49:35 2015
@@ -250,7 +250,7 @@ jsp.error.tld.mandatory.element.missing=
jsp.error.dynamic.attributes.not.implemented=The {0} tag declares that it
accepts dynamic attributes but does not implement the required interface
jsp.error.attribute.noequal=equal symbol expected
jsp.error.attribute.noquote=quote symbol expected
-jsp.error.attribute.unterminated=attribute for {0} is not properly terminated
+jsp.error.attribute.unterminated=attribute value for [{0}] is not properly
terminated
jsp.error.attribute.noescape=Attribute value {0} is quoted with {1} which must
be escaped when used within the value
jsp.error.attribute.nowhitespace=The JSP specification requires that an
attribute name is preceded by whitespace
jsp.error.attribute.duplicate=Attribute qualified names must be unique within
an element
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]