Package javax.el does not exist

I am using jre6 / eclipse and import javax.el. * mistake

package javax.el does not exist [javac] import javax.el. *;

. shouldn't that be part of java? can someone tell me why this might be. thanks t

+6
java el
source share
5 answers

I am developing through an eclipse. I am not currently using Dynamic Web Project, but I am using ant to build the application.

Already including this (many years ago, and then forgetting):

Then I add el-api.jar to the configuration of the servlet container:

<path id="compile.cliClasspath"> <fileset dir="${cliLibDir}"> <include name="*.jar" /> </fileset> <fileset dir="${cliTomcatlib}"> <include name="servlet-api.jar" /> <include name="jsp-api.jar" /> <include name="el-api.jar" /> </fileset> </path> 
+1
source share

EL (Unified Expression Language) is part of the Java EE specification. You can find this library as part of any Java EE server or JSP container. Implementations are also available separately from Glassfish , Apache or JUEL .

+4
source share

This is usually part of the servlet container in question (the servlet container is basically a concrete implementation of the Servlet / JSP / EL parts of the abstract Java EE API). Required libraries are usually available in ServerInstallFolder/lib . You just need to just include it in the compiletime class path.

However, when developing in Eclipse, it is common practice that you integrate the server in question in the Servers view and associate a dynamic web project with it. In the server view, simply add a new server and find the existing server installation. You should then see this during the wizard for creating a dynamic web project. You can also add / change it later in the "Servers" section of the project properties.

After that, Eclipse will simply automatically include the server libraries in the build path of the project (read: the class path managed by the IDE, which is used both at compile time and at run time), including javax.el .

+3
source share

The servlet API is not "part of Java"; it is defined by Java EE (the "corporate version") and can be found in the libraries provided by your servlet container.

+1
source share

I had the same problem. I had to include jar tomcat / lib / el-api.jar in my web-inf / lib folder and ant build worked fine :)

0
source share

All Articles