可以在你WEB应用的web.xml文件中配置如下:
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/download/*</url-pattern>
</web-resource-collection>
<auth-constraint>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/download/*</url-pattern>
</web-resource-collection>
<auth-constraint>
</auth-constraint>
</security-constraint>
解决方案 »
- 在Unix上报错Can't connect to window server - not enough permissions
- ajax基础问题
- 关于日期连续显示问题
- java报错
- 请教各位高手!急!关于缓存的。
- 请教一个问题
- 注册程序出错!求教
- 在DB2里怎样将一个字段为blob的内容置空?
- 还是内码转换问题啊.但是就是显示不出来,请教各位高手
- 请问在jsp中怎么得到提交上来的textarea的内容的unicode编码的长度!
- [c3p0] Exceptions occurred while trying to close a PooledConnection's resources
- 新手求教
不想这样的话,可以考虑用Filter。
<urlrewrite>
<rule>
<from>^[\./]*/upload/.*\.jsp$</from>
<to>/deny.html</to>
</rule>
</urlrewrite>