luehe 2002/12/16 12:39:17
Modified: jasper2/src/share/org/apache/jasper/resources
messages.properties
jasper2/src/share/org/apache/jasper/compiler
TagLibraryInfoImpl.java
Log:
Fixed 15404: No error condition raised if mandatory TLD elements
<jsp-version> and <tlib-version> are not present in the TLD
Revision Changes Path
1.73 +2 -2
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties
Index: messages.properties
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- messages.properties 16 Dec 2002 19:43:53 -0000 1.72
+++ messages.properties 16 Dec 2002 20:39:17 -0000 1.73
@@ -278,9 +278,9 @@
jsp.error.tld.fn.invalid.signature.classnotfound=Invalid syntax for function
signature in TLD. Class not found: ${0}. Tag Library: {1}, Function: {2}.
jsp.error.tld.fn.invalid.signature.commaexpected=Invalid syntax for function
signature in TLD. Comma ',' expected. Tag Library: {0}, Function: {1}.
jsp.error.tld.fn.invalid.signature.parenexpected=Invalid syntax for function
signature in TLD. Parenthesis '(' expected. Tag Library: {0}, Function: {1}.
+jsp.error.tld.mandatory.element.missing=Mandatory TLD element missing or empty: {0}
jsp.error.dynamic.attributes.not.implemented=The {0} tag declares that it accepts
dynamic attributes but does not implement the required interface
jsp.error.nomatching.fragment=Cannot find an attribute directive (with name={0} and
fragment=true) prior to the fragment directive.
-jsp.error.tld.mandatory.element.missing=Mandatory TLD element missing: {0}
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
1.30 +5 -9
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Index: TagLibraryInfoImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagLibraryInfoImpl.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- TagLibraryInfoImpl.java 16 Dec 2002 19:43:53 -0000 1.29
+++ TagLibraryInfoImpl.java 16 Dec 2002 20:39:17 -0000 1.30
@@ -244,8 +244,6 @@
Vector tagVector = new Vector();
Vector tagFileVector = new Vector();
Hashtable functionTable = new Hashtable();
- boolean tlibVersionSeen = false;
- boolean jspVersionSeen = false;
// Create an iterator over the child elements of our <taglib> element
ParserUtils pu = new ParserUtils();
@@ -261,11 +259,9 @@
if ("tlibversion".equals(tname) // JSP 1.1
|| "tlib-version".equals(tname)) { // JSP 1.2
this.tlibversion = element.getBody();
- tlibVersionSeen = true;
} else if ("jspversion".equals(tname)
|| "jsp-version".equals(tname)) {
this.jspversion = element.getBody();
- jspVersionSeen = true;
} else if ("shortname".equals(tname) ||
"short-name".equals(tname))
this.shortname = element.getBody();
@@ -306,11 +302,11 @@
}
- if (!tlibVersionSeen) {
+ if (tlibversion == null) {
err.jspError("jsp.error.tld.mandatory.element.missing",
"tlib-version");
}
- if (!jspVersionSeen) {
+ if (jspversion == null) {
err.jspError("jsp.error.tld.mandatory.element.missing",
"jsp-version");
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>