将默认首页设置成index.do的方法
来源:互联网 发布:电路板设计软件 编辑:程序博客网 时间:2024/05/14 23:31
最近做了一个手机论坛,表现层用的struts,首页在struts里配置为index.do。但是由于web.xml里面的默认页配置welcome-file 必须为物理存在的文件,那么对于index.do这样的首页,tomcat就不会继续往下处理,而直接返回404了。
但是我又非常迫切、非常盼望、非常渴望使用index.do做首页,怎么办?
Tomcat中用一段注释:
When a request URI refers to a directory, the default servlet looks for a "welcome file" within that directory and, if present, to the corresponding resource URI for display 。
意思就是说,tomcat只要找到存在这样一个名字的物理文件,就会转到下面继续处理,那么简单了,在目录下建一个空的文件,名字就是index.do(小小的欺骗了一下tomcat),一切就搞定了!
- 将默认首页设置成index.do的方法
- 在web.xml中设置虚拟文件默认首页--index.do的方法
- Apache中设置默认首页的方法
- Apache中设置默认首页的方法
- Apache:设置首页运行index.html index.php的顺序
- tomcat服务器中设置.do等地址为首页的方法
- tomcat服务器中设置.do等地址为首页的方法
- 如何将Tomcat的默认首页换成自定义的首页
- 如何将Tomcat的默认首页换成自定义的首页
- Apache 虚拟目录和默认首页的设置
- Apache 虚拟目录和默认首页的设置
- Apache 设置默认首页的配置
- Tomcat如何设置网站的默认首页
- Spring boot之默认首页的设置
- SpringMVC默认首页设置
- Apache设置默认首页
- struts2设置默认首页
- apache设置默认首页
- 互联网二次造富:从技术公司到运营平台的蜕变
- 写写Spring(一些优点)
- 批处理
- DNS
- SQL Server中临时表与表变量的区别
- 将默认首页设置成index.do的方法
- 收集的比较好的儿童网站
- 变态楼主.和暴强回复
- 电脑高手常用的快捷键
- 用Nginx做web服务器介绍
- Ubuntu下Sudo命令配置实例
- 分享:半年游戏测试的思考
- update 1
- 眼球