jsp学习笔记

(20150211)

(1) MyEclipse 6.5 JSP空指针异常或类型转换错误

org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

http://heisetoufa.iteye.com/blog/227270_


el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();

org.apache.jasper.JasperException: java.lang.NullPointerException

http://www.docin.com/p-599882783.html


解决方法:

删除WEB-INF/lib中的

jsp-api.jar(这个jar干扰)

jstl.jar

servlet-api.jar

standard.jar

然后右键->属性->Java Build Path->Add Libraries->MyEclipse Libraries添加Java EE 5

如果编译库中包含jetty-server-8.1.8.jar,请移动到WEB-INF/lib外的目录,再引用它。



(2) MyEclipse6.5支持tomcat 7

http://jingyan.baidu.com/article/a65957f48db5b324e67f9bc8.html

将Tomcat7安装目录下bin中的tomcat-juli.jar添加到Configure->Path->Append to class path中


(3)java.lang.NoSuchMethodError:javax.servlet.ServletContext.getContextPath()Ljava/lang/String;

http://blog.csdn.net/tonytfjing/article/details/38980489

http://stackoverflow.com/questions/8611777/java-lang-nosuchmethoderror-javax-servlet-servletcontext-getcontextpathljava

因为这个函数只支持Servlet 2.5

所以不能用tomcat 6只能用tomcat 7

安装见(2)


(TODO)

你可能感兴趣的:(tomcat,jsp,空指针)