且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

防止访问 Tomcat6 中的某些 webapps

更新时间:2022-04-15 07:39:47

不能对允许属性使用通配符...另一方面你可以strong> 使用 1 作为拒绝属性.

You can't use a wild card for the allow attribute...on the other hand you can use one for the deny attribute.

<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="*"/>

这就是为什么我用上面的代码得到 403.

This is why I was getting a 403 with the above code.

我处理这个问题的另一种方式是我创建了一个 jsp,将流量重定向到我想要的任何地方.

Also another way I handled this was I created a jsp that redirected traffic to wherever I wanted.