Struts启动错误
来源:互联网 发布:sql中单引号 编辑:程序博客网 时间:2024/06/05 20:54
当把struts2下所有的包放在lib下,启动时的确会报错(啥错给忘了),最好是用到什么包自己加什么包,我最常用ssh所以~~~,一下错误经验分享一下。
1。没有加入spring包以前,只加入了struts2-spring-plugin-2.0.6.jar
2007-3-21 17:37:29 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory
2007-3-21 17:37:29 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory
class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/C:/Program%
20Files/tomcat5.5.23/webapps/Hello/WEB-INF/lib/struts2-spring-plugin-2.0.6.jar!/struts-
plugin.xml:8:132
2。加入了spring包以后的工程
java.lang.NullPointerException
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance
java.lang.NullPointerException
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance
(SpringObjectFactory.java:188)at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType
(XmlConfigurationProvider.java:479)
3。/在web.xml文件中加入,问题解决
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
//listenre会自动在web-inf文件夹下寻找applicationcontext.xml文件,如果你的spring配置文件配置了好多,可以采取
context-param的参数来解决
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
4。struts2的标签无法读取
Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
java.lang.NullPointerException
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
在web.xml中加入
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping〉
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping〉
- struts启动错误---解决方法
- Struts启动错误
- Struts-新建Filter后Tomcat启动错误
- 启动服务,struts.xml文件报引入文件错误
- Struts错误
- struts 2在Tomcat6中的启动错误:Exception starting filter struts2
- tomcat6启动出现的错误 Exception starting filter struts com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance
- Struts 中常见错误
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- struts常见错误
- Struts 中常见错误
- Struts常见错误汇总
- Struts常见错误汇总
- Struts常见错误汇总
- MFC获取当前时间
- 无数个网站建议把ACCESS数据库文件放到bin目录下,求你们别再害人了!
- C语言对通讯数据包生成校验码的例子
- 一个Windows C++的线程池的实现
- 回忆属于我的第五届“飞思卡尔”智能车竞赛
- Struts启动错误
- 如何获取系统的当前时间
- ubuntu环境变量的设置
- 移植dm9000ae驱动到u-boot
- globalfifo精彩问答
- AS加载SWF间的交互
- windows md5sum
- 关于集群数据负载均衡
- Android Socket网络通信