TomCat 6:欢迎页面可以在WEB-INF里面吗? [英] TomCat 6: can welcome page be inside WEB-INF?

查看:30
本文介绍了TomCat 6:欢迎页面可以在WEB-INF里面吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照这个例子来让 Spring up &运行:http://static.springsource.org/docs/Spring-MVC-step-by-step/part2.html

I'm following this example to get Spring up & running: http://static.springsource.org/docs/Spring-MVC-step-by-step/part2.html

他们所做的是将所有 .jsp 文件移动到 WEB-INF 中,以阻止用户直接访问它们……到目前为止一切顺利.然而,servlet 有一个 index.jsp 的欢迎页面,当它在 WEB-INF 目录中移动时,我会收到错误消息.我无法确定 Tomcat 6 是否应该允许欢迎页面位于 WEB-INF 内?

What they do is move all .jsp files inside the WEB-INF, to stop users accessing them directly... so far so good. However the servlet has a welcome page of index.jsp, and when this is moved inside the WEB-INF dir I get errors. I can't determine if Tomcat 6 should allow the welcome page to be inside WEB-INF or not?

推荐答案

WEB-INF 中的任何东西都不能直接访问,但必须先通过别的东西(通常是一个 servlet),然后在内部将请求转发到 WEB-INF 资源.

Nothing inside WEB-INF can be directly accessed, but must first pass through something else (usually a servlet), which then forwards the request internally to the WEB-INF resource.

这篇关于TomCat 6:欢迎页面可以在WEB-INF里面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆