改成
<?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">
....
<?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">
....
解决方案 »
- An internal error occurred during: "Refreshing external folders".
- Struts2和hibernate整合
- 程序访问量大,服务器CPU一直增加
- web查询的问题~
- 我刚学java不太了解这些名词,什么是j2ee?
- 怎么用java servlet调用 cmd 并让其在里面执行c;\marjet。exe这样的程序
- 关于java调用snmp的问题
- 网页加载applet时总有安全警告
- java 怎么实现获取系统正在运行进程的信息?
- 已经将收得到的Mail写道本地,如何根据这个文件创建一个MimeMessage对象?
- 如何使用java给JavaScript传值?
- java解析XML 出现的
<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"> <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>com.cabyte.common.StartupListener</listener-class>
</listener>
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter> <filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping></web-app>注意你的 applicationContext.xml如果有错也不行的
<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"> <!-- sessionFactory spring管理hibernate-->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>
</beans>
<param-name> contextConfigLocation </param-name>
<param-value> classpath:applicationContext.xml </param-value>
</context-param> 屏蔽掉试试。
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
是联系spring的,去掉好像不行。
然后,如果<filter>没必要就不要配置
我也觉得我的jar包有问题,我把所有的struts2.0.11的jar包都放到lib下了。
严重: Error filterStart
2008-2-27 16:41:35 org.apache.catalina.core.StandardContext start
严重: Context [/strive] startup failed due to previous errors <filter>
<filter-name> struts2 </filter-name>
<filter-class> org.apache.struts2.dispatcher.FilterDispatcher </filter-class>
</filter>
<filter-mapping>
<filter-name> struts2 </filter-name>
<url-pattern> /* </url-pattern>
</filter-mapping>
是什么意思?