我只整合spring和strurs2,页面404打不开,运行tomcat报错:
2011-11-7 11:24:48 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2011-11-7 11:24:48 org.apache.catalina.core.StandardContext start
严重: Context [/springStruts] startup failed due to previous errors
2011-11-7 11:24:49 org.apache.coyote.http11.Http11AprProtocol start使用myeclipse5.5自动加入spring aop、core、web的jar包,然后拷贝strurs2包如图:web.xml:<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
struts.xml<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.objectFactory" value="spring" />
</struts>
applicationContext.xml是自动生成的,没改<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
</beans>
2011-11-7 11:24:48 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2011-11-7 11:24:48 org.apache.catalina.core.StandardContext start
严重: Context [/springStruts] startup failed due to previous errors
2011-11-7 11:24:49 org.apache.coyote.http11.Http11AprProtocol start使用myeclipse5.5自动加入spring aop、core、web的jar包,然后拷贝strurs2包如图:web.xml:<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
struts.xml<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.objectFactory" value="spring" />
</struts>
applicationContext.xml是自动生成的,没改<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
</beans>
解决方案 »
- 像java那样使用javascript调用java
- 一个问题困扰我好几天了,急求。 'sessionFactory' or 'hibernateTemplate' is required
- jsp和简单的SQL数据库使用
- myeclipse 发布WEB 功能出现问题
- struts2 + tomcat虚拟目录下载
- 在线用户的显示功能是怎么设计的?
- session.createSQLQuery为什么不能更新数据库???急
- 如何得到在线人员列表?
- 我是jsp初学者,我想请问要开发一个电子商务系统(小型)我该用什么服务器呢? 谢谢
- JSP的运行问题,急判回复,谢谢
- web应用网络架构的问题,网络不是太懂
- ajax时乱码 求解
没配置struts拦截啊