Yesterday, I used JSTL for the first time, because I was developed with Eclipse, I'm going to start with an online article:
1. Download and extract JAKARTA JSTL 1.1.1.
2. Copy the two JAR files in the decompressed lib directory to the web-inf / lib directory under their application under Tomcat
3. Copy the TLD file under the decompressed TLD directory to the web-inf / directory under its own application under Tomcat
4. Modify Web.xml as the following:
XML Version = "1.0" Encoding = "ISO-8859-1">
Taglib-uri> http://java.sun.com/JSTL/X taglib-uri>
c: foreach> body> html>
Then start Tomcat, start testing, then inexplicable errors appear:
StandardWrapperValve [jsp]: Servlet.service () for servlet jsp threw exceptionjava.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getVariableResolver () Ljavax / servlet / jsp / el / VariableResolver; at org.apache.jasper.runtime. PageContextImpl.proprietaryEvaluate (PageContextImpl.java:941) at org.apache.jsp.teslib3_jsp._jspx_meth_c_out_0 (teslib3_jsp.java:143) at org.apache.jsp.teslib3_jsp._jspx_meth_c_forEach_0 (teslib3_jsp.java:113) at org.apache.jsp .teslib3_jsp._jspService (teslib3_jsp.java:65) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service (HttpServlet.java:856) at org. apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service (JspServlet. Java: 248) at javax.servlet.http.httpservlet.service (httpservlet.java: 856) ....
Best can't help know, some of the documents say that compiler is wrong, or LiB is not added, I have repeatedly examined the error (Java environment: jsdk1.4.2.7)
StandardWrapperValve [jsp]: Servlet.service () for servlet jsp threw exceptionjava.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getVariableResolver () Ljavax / servlet / jsp / el / VariableResolver; at org.apache.jasper.runtime. PageContextImpl.proprietaryEvaluate (PageContextImpl.java:941) at org.apache.jsp.teslib3_jsp._jspx_meth_c_out_0 (teslib3_jsp.java:143) at org.apache.jsp.teslib3_jsp._jspx_meth_c_forEach_0 (teslib3_jsp.java:113) at org.apache.jsp .teslib3_jsp._jspService (teslib3_jsp.java:65) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service (HttpServlet.java:856) at org. apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service (JspServlet. Java: 248) at javax.servlet.http.httpservlet.service (httpservlet.java: 856) ....
Best can't help know, some of the documents say that compiler is wrong, or LiB is not added, I have repeatedly examined the error (Java environment: jsdk1.4.2.7)
After repeated trial, I removed the XMLNs and XSI properties of Web.xml (red part), and the result is OK, but the specific reason has been unclear, I hope the master will explain.