--- compiler/Generator.java (revision 1416791) +++ compiler/Generator.java (working copy) @@ -124,6 +124,8 @@ private GenBuffer charArrayBuffer; private final DateFormat timestampFormat; + + private ELInterpreter elInterpreter; /** * @param s @@ -831,7 +833,7 @@ } return v; } else if (attr.isELInterpreterInput()) { - v = JspUtil.interpreterCall(this.isTagFile, v, expectedType, + v = elInterpreter.interpreterCall(ctxt, this.isTagFile, v, expectedType, attr.getEL().getMapName(), false); if (encode) { return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode(" @@ -917,7 +919,7 @@ n.setBeginJavaLine(out.getJavaLine()); if (!pageInfo.isELIgnored() && (n.getEL() != null)) { out.printil("out.write(" - + JspUtil.interpreterCall(this.isTagFile, n.getType() + + + elInterpreter.interpreterCall(ctxt, this.isTagFile, n.getType() + "{" + n.getText() + "}", String.class, n.getEL().getMapName(), false) + ");"); } else { @@ -2977,7 +2979,7 @@ // run attrValue through the expression interpreter String mapName = (attr.getEL() != null) ? attr.getEL() .getMapName() : null; - attrValue = JspUtil.interpreterCall(this.isTagFile, attrValue, + attrValue = elInterpreter.interpreterCall(ctxt, this.isTagFile, attrValue, c[0], mapName, false); } } else { @@ -3416,7 +3418,7 @@ /** * Constructor. */ - Generator(ServletWriter out, Compiler compiler) { + Generator(ServletWriter out, Compiler compiler) throws JasperException{ this.out = out; methodsBuffered = new ArrayList(); charArrayBuffer = null; @@ -3424,7 +3426,12 @@ ctxt = compiler.getCompilationContext(); fragmentHelperClass = new FragmentHelperClass("Helper"); pageInfo = compiler.getPageInfo(); - + try { + elInterpreter = ELInterpreterFactory.getELInterpreter(compiler.getCompilationContext().getServletContext()); + } catch (Exception e) { + err.jspError("jsp.error.el_interpreter_class.instantiation", e.getMessage()); + } + /* * Temporary hack. If a JSP page uses the "extends" attribute of the * page directive, the _jspInit() method of the generated servlet class --- resources/LocalStrings.properties (revision 1416791) +++ resources/LocalStrings.properties (working copy) @@ -492,3 +492,7 @@ jsp.tldCache.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to the tomcat.util.scan.DefaultJarScanner.jarsToSkip or org.apache.catalina.startup.TldConfig.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file. jsp.tldCache.noTldSummary=At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. + + +#ELInterpreter +jsp.error.el_interpreter_class.instantiation=Failed to load or instantiate ELInterpreter class: {0} --- resources/LocalStrings_es.properties (revision 1416791) +++ resources/LocalStrings_es.properties (working copy) @@ -480,3 +480,6 @@ xmlParser.skipBomFail = No pude saltar BOM al analizar flujo de entrada XML jsp.tldCache.noTldInJar = No se han hallado ficheros TLD en [{0}]. Considera a\u00F1adir el JAR a la propiedad tomcat.util.scan.DefaultJarScanner.jarsToSkip en el fichero CATALINA_BASE/conf/catalina.propeperties. jsp.tldCache.noTldSummary = Al menos un JAR, que se ha explorado buscando TLDs, a\u00FAn no conten\u00EDa TLDs. Activar historial de depuraci\u00F3n para este historiador para una completa lista de los JARs que fueron explorados y de los que nos se hall\u00F3 TLDs. Saltarse JARs no necesarios durante la exploraci\u00F3n puede dar lugar a una mejora de tiempo significativa en el arranque y compilaci\u00F3n de JSP . + +#ELInterpreter +jsp.error.el_interpreter_class.instantiation=No se puede cargar la clase ELInterpreter llamada\: {0} --- resources/LocalStrings_fr.properties (revision 1416791) +++ resources/LocalStrings_fr.properties (working copy) @@ -314,3 +314,6 @@ #jsp.error.jspoutput.nonemptybody= #jsp.error.jspoutput.invalidUse= #jsp.error.invalid.bean= + +#ELInterpreter +jsp.error.el_interpreter_class.instantiation=Impossible de charger ou d''instancier la classe ELInterpreter: {0} --- resources/LocalStrings_ja.properties (revision 1416791) +++ resources/LocalStrings_ja.properties (working copy) @@ -415,3 +415,5 @@ jsp.error.invalid.bean=useBean\u306e\u30af\u30e9\u30b9\u5c5e\u6027 {0} \u306e\u5024\u304c\u7121\u52b9\u3067\u3059 jsp.error.prefix.use_before_dcl=\u3053\u306e\u30bf\u30b0\u6307\u793a\u5b50\u3067\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u30d7\u30ea\u30d5\u30a3\u30c3\u30af\u30b9 {0} \u306f\u3001\u3059\u3067\u306b\u30d5\u30a1\u30a4\u30eb {1} \u306e {2} \u884c\u76ee\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059 +#ELInterpreter +jsp.error.el_interpreter_class.instantiation=ELInterpreter class\u306e\u30ed\u30fc\u30c9\u53c8\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {0}