用ECLIPSE运行项目的时候控制台输出 空指针异常
然后查相应的 *_jsp.java 文件。
定位到抛异常的行,这行的代码是 :
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig()
上网查了一下资料,
原因是自己把TOMCAT 下的一些包放在 WEB-INF/lib 下并添加到工程,
从项目中 移除WEB-INF/lib 下相应TOMCAT里有的包,
再运行就好了
参考:http://www.coderanch.com/t/366342/Servlets/java/null-pointer-jspInit
相关推荐
网上购物系统设计和实现课程设计 四、程序关键代码及效果图 ... su.initialize(this.getServletConfig(), request, response); su.setMaxFileSize(1024 * 1024 * 10); su.setAllowedFilesList("JPG,jpg,gif,GIF");
su.initialize(getServletConfig(), request, response); // 5:上传 su.upload(); // 拿取Smartupload的request // 注意当我们使用了SmartUpload此jar包后 // 无法再次使用httpServletRequest这...
this.uploadPath = this.getServletConfig().getInitParameter("upload_path");//的到web.xml中的配置文件用于保存上传文件,也可以在已开始定义的时候初始化,不过这样可以通过改动配置文件来改动存放路径,不用该...
ApplicationContext cxt = WebApplicationContextUtils.getWebApplicationContext(this.getServletConfig().getServletContext()); Workflow wf = (Workflow)cxt.getBean("workflow"); 用osworkflow自带的designer把...
ServLetContext 解决的问题:不同的用户使用相同的数据 就是不同的用户,访问...ServletContext sc1=this.getServletConfig().getServletContext(); ServletContext sc2=req.getSession().getServletContext(); 注意
ServletConfig config = getServletConfig(); String driverClassName = config.getInitParameter("driverClassName"); String url = config.getInitParameter("url"); String username = config....
FlexContext.getServletConfig().getServletContext() ); String beanName = getSource(); try { log.info("Lookup bean from Spring ApplicationContext: " + beanName); return appContext.getBean(bean...
<%@ page import=org.springframework.web.context...ServletContext sc = this.getServletConfig().getServletContext(); ApplicationContext ac2 = WebApplicationContextUtils.getWebApplicationContext(sc);
FlexContext.getServletConfig().getServletContext() ); String beanName = getSource(); try { log.info("Lookup bean from Spring ApplicationContext: " + beanName); return appContext.getBean...
out.print(this.getClass() + this.getServletConfig().getServletContext().getInitParameter("a")); out.println(", using the GET method"); out.println(" </BODY>"); out.println("</HTML>"); out....
out.print(this.getClass() + this.getServletConfig().getServletContext().getInitParameter("a")); out.println(", using the GET method"); out.println(" </BODY>"); out.println("</HTML>"); out....
out.print(this.getClass() + this.getServletConfig().getServletContext().getInitParameter("a")); out.println(", using the GET method"); out.println(" </BODY>"); out.println("</HTML>"); ...
Overview Package Class Tree Deprecated Index Help PREV NEXT FRAMES NO FRAMES A B C D E F G H I J L P R S U V -------------------------------------------------------------------------------- ...
JAVA相关基础知识 1、面向对象的特征有哪些方面 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用...
185、getServletContext()和getServletConfig()的意思 44 186、Hashtable和HashMap 44 187、JAVA SERVLET API中forward() 与redirect()的区别? 44 189、Can a Java Thread be started from Servlet class, and what...
超级有影响力的Java面试题大全文档 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其中的一部分,暂时不用部分细节。...
185、getServletContext()和getServletConfig()的意思 44 186、Hashtable和HashMap 44 187、JAVA SERVLET API中forward() 与redirect()的区别? 44 189、Can a Java Thread be started from Servlet class, and what...
ServletConfig getServletConfig() 返回传递到servlet的init()方法的ServletConfig对象 void service(ServletRequest request, ServletResponse response)throws ServletException,IOException 处理request对象中...
7 ServletConfig getServletConfig() 返回当前页的ServletConfig对象(config) 8 ServletContext getServletContext() 返回当前页的ServletContext对象(application) 9 void setAttribute(String name,Object ...