Tomcat 禁用PUT方法, 404/500错误重定向, 网站图标
2013-08-24 11:41
555 查看
(1) Tomcat禁用Put等不安全方法。
参考文档: http://yingfangming.blog.163.com/blog/static/165802470201291622853362/
(2) 常见错误页面定向
如果只是这样配置IE浏览器不会重定向,error.jsp里面要写上下面代码,把response的header status code置为200.
参考文档: http://origin100.iteye.com/blog/383460 也可以设置按照异常定向。
(3)网站图标
更换ico图标文件。
参考: http://yaojialing.iteye.com/blog/526339
<security-constraint> <web-resource-collection> <web-resource-name>xxxx-Security-Constraint-0</web-resource-name> <url-pattern>/*</url-pattern> <http-method>PUT</http-method> <http-method>DELETE</http-method> <http-method>HEAD</http-method> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> </web-resource-collection> <auth-constraint> </auth-constraint> </security-constraint>
参考文档: http://yingfangming.blog.163.com/blog/static/165802470201291622853362/
(2) 常见错误页面定向
<error-page> <error-code>404</error-code> <location>/error.jsp</location> </error-page> <error-page> <error-code>500</error-code> <location>/error.jsp</location> </error-page>
如果只是这样配置IE浏览器不会重定向,error.jsp里面要写上下面代码,把response的header status code置为200.
<% response.setStatus(200); %>
参考文档: http://origin100.iteye.com/blog/383460 也可以设置按照异常定向。
(3)网站图标
更换ico图标文件。
参考: http://yaojialing.iteye.com/blog/526339
相关文章推荐
- tomcat下网站经常出现404错误_再刷新就正常_解决方法
- tomcat的安全配置(禁用http方法,部署多个应用,启用从安全cookie,指定错误页面和显示信息)
- [轻微]WEB服务器启用了OPTIONS方法/如何禁止DELETE,PUT,OPTIONS等协议访问应用程序/tomcat下禁用不安全的http方法
- 自定义 404 与 500 错误页面,URL 地址不会重定向(一)
- Tomcat中404/500 错误,自定义错误页面
- Beego 1.6+ 错误页面(404,500)自定义重定向
- IIS6 下使用ASP.NET 4.0时浏览网站出现404错误的解决方法
- 500错误自定义页面不显示,但404自定义页面显示的解决方法
- Idea Tomcat Struts2 hello world 项目出现 500错误 问题解决方法
- 解决win2003下IIS中建立ASP网站出现500内部错误的方法
- nginx反向代理tomcat应用,struts2网站程序redirect时导致请求地址错误的解决方法
- 关于tomcat服务器部署,页面报404/500错误,myeclipse异常关闭 导致tomcat 6.0 无法重启 的问题
- [轻微]WEB服务器启用了OPTIONS方法/如何禁止DELETE,PUT,OPTIONS等协议访问应用程序/tomcat下禁用不安全的http方法
- spring boot下 500 404 错误页面处理的方法
- 网站提示HTTP500内部服务器错误之终极解決方法
- nginx 404 403等错误信息页面重定向到网站首页或其它事先指定的页面
- IIS上部署MVC网站,打开后ExtensionlessUrlHandler-Integrated-4.0解决方法IIS上部署MVC网站,打开后500错误
- asp.net网站的404错误页面的正确设置方法第1/2页
- 修改网站404,500的错误页面
- 服务器出现 HTTP 400、404、500、502 错误原因及解决方法