tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45345] New: Methods "javax.el. ExpressionFactory#newInstance" not implemented
Date Sat, 05 Jul 2008 10:24:51 GMT

           Summary: Methods "javax.el.ExpressionFactory#newInstance" not
           Product: Tomcat 6
           Version: 6.0.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Servlet & JSP API

Just experimenting with the creation of JSP custom tags.
I needed to create a ValueExpression throught the ExpressionFactory class but
I've realized the EL implementation included in Apache doesn't include the
methods "newInstance" of the ExpressionFactory.
I've looked inside the SVN repo just to make sure that the implementation
wasn't in development-

These methods are included in the J2EE 5 specs:

So what about this?

** How to reproduce **
Create a JSP custom component, for instance:

--- [snip] ---
public class MyJspTag extends SimpleTagSupport
        String bean;
        String name;
        String value;


        public void doTag() throws JspException, SkipPageException, IOException
                ELContext elContext = this.getJspContext().getELContext();

                ExpressionFactory expressionFactory = null;
                ValueExpression valueExpression = null;

                expressionFactory = ExpressionFactory.newInstance();
                valueExpression = expressionFactory.createValueExpression(
                                "${" + bean + "." + name + "}",
                valueExpression.setValue(elContext, value);
--- [/snip] ---
Compile adding in the classpath I include the JARs el-api.jar, jsp-api.jar,
servlet-api.jar you found in $CATALINA_HOME/lib

The compilation should give you the error:
--- [snip] ---
    [javac] .../ cannot find symbol
    [javac] symbol  : method newInstance()
    [javac] location: class javax.el.ExpressionFactory
    [javac]             expressionFactory = ExpressionFactory.newInstance();
    [javac]                                                  ^
    [javac] 1 error
--- [/snip] ---


-- Marco

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message