WEB-INF下的web.xml导致404找不到页面错误???????
在工程的WEB-INF下的web.xml文件如下,单访问index.jsp时却一直提示404找不到页面错误,删掉下面代码中<filter>...</filter>以及<filter-mapping>...</filter-mapping>内容后就能正常访问index.jsp,请教各位高手是什么原因啊?
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp">
<display-name>fybg</display-name>
<filter>
<filter-name>Set Web Application Character Encoding</filter-name>
<filter-class>com.eastsoft.servlets.SetEncodeFilter</filter-class>
<init-param>
<param-name>defaultencoding</param-name>
<!--<param-value>iso-8859-1</param-value>-->
<param-value>GBK</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Set Web Application Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Attarchdown</servlet-name>
<servlet-class>Attarchdown</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Attarchdown</servlet-name>
<url-pattern>/webmail/servlet/Attarchdown</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
------解决方案--------------------看看后台报什么错先吧
<param-name>defaultencoding </param-name>
<!-- <param-value>iso-8859-1 </param-value>-->
<param-value>GBK </param-value>
怎么这些都有空格,本来就有还是你发布的时候加上去的。
如果本来就有建议你去掉这些空格