如何配置,页面自动跳转?
2013-04-26 19:18
148 查看
直接在url输入www.fool.com 那么页面默认跳转到www.fool.com/index.htm,进而取用index.htm对应的控制器进行页面渲染。
那么,这个所谓"默认跳转"是如何实现的?怎么配置?我可能会想改一下。
这样写好像太水了,时间不太够,先列下:
apache下,是在/deploy/apache/conf/httpd-linux.conf中,配置:
RewriteRule ^/$ /index.htm [R,L]
tomcat下,是在assembly\template\src\main\resources\OSGI-INF\templates\web.xml中配置,
http://wenku.baidu.com/view/49b8c0ec4afe04a1b071def0.html
http://angrycoder.iteye.com/blog/919375
http://jackandroid.iteye.com/blog/545099
/article/1278772.html
http://www.ibm.com/developerworks/cn/java/j-velocity/
<welcome-file-list>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
正常的controller间,指定跳转:
return "redirect:/index.htm";
那么,这个所谓"默认跳转"是如何实现的?怎么配置?我可能会想改一下。
这样写好像太水了,时间不太够,先列下:
apache下,是在/deploy/apache/conf/httpd-linux.conf中,配置:
RewriteRule ^/$ /index.htm [R,L]
tomcat下,是在assembly\template\src\main\resources\OSGI-INF\templates\web.xml中配置,
http://wenku.baidu.com/view/49b8c0ec4afe04a1b071def0.html
http://angrycoder.iteye.com/blog/919375
http://jackandroid.iteye.com/blog/545099
/article/1278772.html
http://www.ibm.com/developerworks/cn/java/j-velocity/
<welcome-file-list>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
正常的controller间,指定跳转:
return "redirect:/index.htm";
相关文章推荐
- 如何页面自动跳转,学习到就要写下来,怕忘记了
- IIS配置:自定义错误页面&不允许访问目录 访问不存在目录、访问目录、访问不存在页面自动跳转
- 如何做登录后自动跳转到登录前要访问的页面
- 当客户访问一个需登陆的页面时会转到登陆页面,当客户登陆成功后会自动跳转到客户登陆前的那个页面,请问该如何实现?
- 如何实现页面自动跳转
- 停顿几秒后自动跳转,这个时候如何在页面上显示倒计时
- 如何解决firefox打开链接自动跳转至新页面?
- IIS配置:自定义错误页面&不允许访问目录 访问不存在目录、访问目录、访问不存在页面自动跳转
- 如何让页面自动跳转
- asp.net出错或404错误(找不到页面)自动跳转 webconfig配置方法
- 拦截器springmvc防止表单重复提交【3】3秒后自动跳回首页【重点明白如何跳转到各自需要的页面没有实现 但是有思路】
- session过期后含用iframe页面如何自动跳转到登陆页
- 如何做一个自动跳转的SharePoint页面?
- 在ASP.NET登录页面中如何实现文本框焦点自动跳转及通过回车键提交表单
- 在asp.net 中 如何在登录成功后2秒内自动跳转到登录前的页面
- 33.如何用H5标签进行页面自动跳转和自动刷新
- 如何解决thinkphp错误页面无法自动跳转?
- 如何让当前页面3秒以后自动跳转到其他页面
- asp.net如何让未登录用户登录后能自动跳转到登录前访问的页面
- [心得] phoneGap,doctor总结。重点是如何让页面自动跳转到settings bundle中用户设置的网址