First of all, the topic: because it is in my handling of the project upgrade at the same time encountered the above problems, generally encountered, so I said
No more wordy, the point:
Provide TOMCAT6 in the local server, and then configure severs tomcat in MyEclipse to add the local Tomcat6
If the EL expression inside your Web page uses the #{} expression, or if you have configured a jstl version of Severlet dependency, the reason for the upgrade is that the TOMCAT6 specification used by TOMCAT5 and Jsp/severlet is different
Tomcat6 jsp2.1/servlet2.5/jstl2.0
TOMCAT5 jsp2.0/servlet2.4/jstl1.1
TOMCAT4 jsp1.2/servlet2.3/jstl1.0
Before JSP2.1, the JSP compiler did not parse the #{} expression (not the reserved expression) because in the previous JSP the El expression was ${}, and because #{} was not an expression reserved by the JSP, the El expression in the JSP was represented by #{}; In Struts2, OGNL (object-graph Navigation Language, a powerful expression language) is also represented by #{};
However, in the JSP2.1 specification, Sun, in order to unify the EL expression syntax of the JSP, #{} as the reserved expression of the JSP (Sun claims to be able to directly reference JSF Managedbean in the pure JSP), that is, the server with the JSP2.1 specification will be automatically compiled #{} expression, so the El expression no longer uses the #{} expression
The problem is known, and the next solution:
1. Replace the JSTL external jar package in Web-inf under Lib: JSTL1.2 (jstl-1.2.jar) Replace JSTL1.1 (Standard-1.1.jar and Jstl-1.1.jar)
2. Web. XML must specify specifications using Servlet 2.5 and JSP2.1:
<web-app version= "2.5" xmlns= "HTTP://JAVA.SUN.COM/XML/NS/J2EE"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation= "Http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" >
Note here: The Tomcat version is backwards compatible with the servlet specification and JSP specifications, such as the above, If the TOMCAT6 corresponding servlet2.5 specification and jsp2.1 specification are not used in the project, you can still use the servlet2.4 and jsp2.0 specifications (for XML file configuration)
3. There are several ways to resolve this step:
First: Add in the Web. xml file
<jsp-property-group>
<deferred-syntax-allowed-as-literal>
True
</deferred-syntax-allowed-as-literal>
</jsp-property-group>
Second: Add <%@ page contenttype= "text/html in JSP pages; Charset=utf-8 "deferredsyntaxallowedasliteral=" true "%>
I've tried both of these ways, and it's not working.
I adopt the Third kind: will #{.... Change to \#{.... }
There is a fourth way: replace the #{} expression used in the page,
PS: You may also encounter a problem when you choose Tomcat6, which is the console
Critical: The Web application [/codemarket] registered the JBDC driver[...] But failed to unregister it when the Web application was stopped. To prevent a memory leak, the JDBC Driver have been forcibly unregistered.
If you make an error on the severity above, then your Tomcat version must be on the 6.0.25.
Cause: After Tomcat 6.025 introduced memory leak detection in sever.xml, it makes logs for images that garbage collection cannot handle.
Workaround:
1, Tomcat version for 6.0.25 under the
2. In Tomcat's Server.xml file,
<!--Prevent memory leaks due to use of particular Java/javax apis-->
<listener classname= "Org.apache.catalina.core.JreMemoryLeakPreventionListener"/> This monitor to turn off, has no effect on the project, If this type of exception is not reported before the monitoring is turned off, the shutdown is not affected, if there is an associated exception thrown before the listener is turned off, then the effect is the same as the person without pain, sick or not know, there is no radical method on the net, because the solution is to take your memory leak problem to handle good
Okay, Mysql-connection-java.jar, put it in Tomcat's lib.
The Web application [/ZZTI] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver