struts2错误初步2
2007-10-19 15:03
127 查看
当把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
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
(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>
//listenre会自动在web-inf文件夹下寻找applicationcontext.xml文件,如果你的spring配置文件配置了好多,可以采取
context-param的参数来解决
<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)
在web.xml中加入
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping〉
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
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
(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>
//listenre会自动在web-inf文件夹下寻找applicationcontext.xml文件,如果你的spring配置文件配置了好多,可以采取
context-param的参数来解决
<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)
在web.xml中加入
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping〉
相关文章推荐
- Struts2入门初步需掌握(一)
- Struts2 异常错误总结
- 关于 Struts2 配置后启动Tomcat 时出现的错误
- JavaEE SSH框架整合(三) struts2 异常、http错误状态码处理
- struts2初步使用
- 如何自定义Struts2表单验证后的错误信息显示格式
- Struts2 常见错误
- Struts2 - Unable to load configuration. - bean 错误解决
- Struts2 报类型异常错误
- 关于struts2验证框架,在与spring整合后重复输出错误信息的问题
- J2EE项目web.xml文件中Struts2配置错误
- ssh整合思想初步 struts2与Spring的整合 struts2-spring-plugin-2.3.4.1.jar下载地址 自动加载Spring中的XML配置文件 Struts2下载地址
- struts2错误:The Struts dispatcher cannot be found.
- NetBeans无法部署struts2项目,尚未部署该模块错误
- struts2校验问题!重复提交错误信息!
- 关于struts2拦截器错误
- struts2 报403 错误
- struts2 在netbeans 中的错误 There is no Action mapped for namespace / and action name 的解决
- 【struts2】一个BBS论坛初步显示Category-update.jsp
- maven创建struts2的web工程启动时报过滤器找不到错误