kinman 2003/06/23 16:20:45
Modified: jasper2/src/share/org/apache/jasper/compiler Generator.java
Log:
- Allow the "value" attrbute of <jsp:param> action be non String types.
Revision Changes Path
1.189 +14 -11
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
Index: Generator.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -r1.188 -r1.189
--- Generator.java 24 May 2003 00:53:09 -0000 1.188
+++ Generator.java 23 Jun 2003 23:20:44 -0000 1.189
@@ -709,16 +709,19 @@
if (!attr.isNamedAttribute() && (v == null))
return "";
- if (attr.isExpression() || attr.isELInterpreterInput()) {
- if (attr.isELInterpreterInput()) {
- boolean replaceESC = v.indexOf(Constants.ESC) > 0;
- v = JspUtil.interpreterCall(this.isTagFile,
+ if (attr.isExpression()){
+ if (encode) {
+ return
"org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(String.valueOf(" + v + "),
request.getCharacterEncoding())";
+ }
+ return v;
+ } else if (attr.isELInterpreterInput()) {
+ boolean replaceESC = v.indexOf(Constants.ESC) > 0;
+ v = JspUtil.interpreterCall(this.isTagFile,
v, expectedType,
attr.getEL().getMapName(), false );
- // XXX ESC replacement hack
- if (replaceESC) {
- v = "(" + v + ").replace(" + Constants.ESCStr + ", '$')";
- }
+ // XXX ESC replacement hack
+ if (replaceESC) {
+ v = "(" + v + ").replace(" + Constants.ESCStr + ", '$')";
}
if (encode) {
return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(" +
v + ", request.getCharacterEncoding())";
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]