# Usually commented out on production environments
[logger.apache2]
file=”D:/Apache2/logs/error.log”
level=ERROR
# Provide the basic config needed
[config]
file=D:/Apache2/conf/workers2.properties
debug=1
# Provide the location of shm file on the Apache web server
[shm]
file=D:/Apache2/conf/jk2.shm
size=1000000
[channel.socket:localhost:8009]
port=8009
host=localhost
#define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
# Map the Tomcat examples webapp to the Web server uri space
[uri:/jsp-examples/*]
[uri:/*.jsp]
打开d:\test\tomcat51\webapps\jsp-examples\WEB_INF\web.xml 文件,在security-constraint 标签下,增加如下内容:
<user-data-constraint>
<description>
Constrain the user data transport for the whole application
</description>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
注释掉<auth-constraint>标签下的内容
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>tomcat</role-name>
<role-name>role1</role-name>
</auth-constraint>
在web-resource-collection 标签下,增加如下内容:
<url-pattern>/*</url-pattern>
重新启动Apache和tomcat,