,错误页面友好提示
500 页面编译错误
404 页面没有找到
403 因用户试图访问未授权文档而产生
如下:
选择文件的打开方式为ie自己打开还是下载后打开
设置系统查找log4j.properties文件的路径
添加过滤器,对所有路径下所传得参数进行过滤
设置启动级别
欢迎页面,即进入项目时候默认的页面
500 页面编译错误
404 页面没有找到
403 因用户试图访问未授权文档而产生
如下:
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/500.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/403.jsp</location>
</error-page>
选择文件的打开方式为ie自己打开还是下载后打开
<!-- upload file type -->
<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xls</extension>
<mime-type>application/msexcel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pdf</extension>
<mime-type>application/pdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zip</extension>
<mime-type>application/zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>rar</extension>
<mime-type>application/rar</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>application/txt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>chm</extension>
<mime-type>application/mshelp</mime-type>
</mime-mapping>
<mime-mapping>
<extension>mp3</extension>
<mime-type>audio/x-mpeg</mime-type>
</mime-mapping>
设置系统查找log4j.properties文件的路径
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>
添加过滤器,对所有路径下所传得参数进行过滤
<filter>
<filter-name>EncodingFilter</filter-name>
<filter-class>
com.xxx.xxx.EncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>EncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
设置启动级别
<load-on-startup>1</load-on-startup>
欢迎页面,即进入项目时候默认的页面
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>