----------- Post Start ---------- this article
Cowboy Posted on:
Riding an ant on Mars
|
[Convert] java. Lang. noclassdeffounderror: javax/El/expressionfactory
Tomcat5.5.17 + jstl1.2 + servlet2.5 + jsp2.1 Configuration
The environment I use here is:
Tomcat5.5.17
Jstl1.2
Servlet2.5
Struts1.2 + spring2.0 + hibernate3.1
If you publish a project according to the preceding directory, the following exception is thrown:
(1) Java. Lang. noclassdeffounderror: javax/El/expressionfactory
(2) or displayed after the page is opened:
HTTP status 404-/hello1/TypeStatus Report Message/Hello1/ DescriptiThe requested resource (/hello1/) is not available.
Apache Tomcat/5.5.17
Then copy the javaee. jar package and place it in the common/lib directory of Tomcat.
Javaee. jar, jsf-api.jar, jsf-impl.jar, jstl-1.2.jar these four packages can be obtained through myeclipse, if you install myeclipse5.5, I installed myeclipse 5.5.1 Ga, these four packages are located in the directory is: myeclipse 5.5.1 Ga/myeclipse/Eclipse/plugins/COM. genuitec. eclipse. j2eedt. core_5.5.1/data/libraryset/ee_5
|
----------- Post END ----------
After completing the preceding steps, the new problem occurs: $ {} is output on the running page, why?
Solution:
----------- Post Start ----------
Problem:
When $ {Param} is directly used when JSP El expressions are used, $ {Param} is output on the page, and <C: out value = "$ {Param}"/> cannot be displayed normally?
Cause and solution:
It may conflict with jstl. For example, it is added to the header.
<% @ Taglib uri = "http://java.sun.com/jsp/jstl/core divfix =" C "%>
1. When your page does not use the operations in these standard flag libraries, delete the preceding statements, that is, do not include jstl information, and you can output $ {Param} normally}
2. Add to the top
<% @ Page iselignored = "false" %>
You can use JSP 2.0 El and jstl at the same time.
----------- Post END ----------
The above is a post.
After testing, it was found that Tomcat 6 can work normally without adding <% @ page iselignored = "false" %>,
However, tomcat5.5 needs to add this sentence to avoid outputting $ {} on the page {}.