注册 登录
编程论坛 J2EE论坛

如何配置filter

lewis0323 发布于 2006-11-06 21:03, 767 次点击

启动服务器时显示 Error filterStart
Context [/helloapp] startup failed due to previous errors
这是我的配置文件 请问哪里出错了?
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>HelloApp Struts Application</display-name>
<description>
Welcome to Tomcat
</description>


<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>hello.SetCharacterEncodingFilter</filter-class>

</filter>
<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- JSPC servlet mappings start -->

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>






<welcome-file-list>
<welcome-file>hello.jsp</welcome-file>
</welcome-file-list>



<jsp-config>

<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>

<!-- JSPC servlet mappings end -->
</jsp-config>
</web-app>

0 回复
1