-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

André,

On 6/16/15 12:02 PM, Andre Gomes wrote:
> I am using tomcat 7.0.52.0 and I am trying to redirect the request
> from http to https so I added to /etc/tomcat7/web.xml:
> 
> <security-constraint> <web-resource-collection> 
> <web-resource-name>Protected Context</web-resource-name> 
> <url-pattern>/*</url-pattern> </web-resource-collection> 
> <user-data-constraint> 
> <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
> </user-data-constraint> </security-constraint>

Stop. Restore the file to the original.

Now, go into the WEB-INF/web.xml of your web application and modify
*that* file instead.

> And it works for the localhost host. But I have two host in the 
> server.xml:
> 
> <Host name="localhost"  appBase="webapps" unpackWARs="true"
> autoDeploy="true"> ... </Host> <Host name="other.host"
> appBase="/srv/webapp" unpackWARs="true" autoDeploy="true"> ... 
> </Host>
> 
> And it does not work for the "other.host" host. Also tried to put
> but didn't work:
> 
> <url-pattern>other.host/*</url-pattern>
> 
> My question is, how can I do to work in the "other.host" host but
> not in the "localhost" host?

It should work regardless of the host.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVgFWZAAoJEBzwKT+lPKRYArYQAJLL8gbTuNsouYwMe6Bc34RL
1w3aP5hl7GilOx6ESbCWZqVOxC406Tvleje4hSRWGWMMccSVd43KeX2k2D53zk85
ujpfwgEI3mlkBydV3MpSZTqrNzQykjO2qqnmWBp1X5voolDXO0+noHvzk9Ic3NXz
TWC30dG5TtvPre+GqE+MBrwDOxilJgH9vK3BfGcP6l1nWq3UMfLyxfcOmOmvAHDp
Jin3YT5cG3UtqSlsUfTA7B1f6+pZJbpBDQ6FOXjQSI3tYOO3EewnRmQ+zylnGutd
RMPU3A1PIDF6IkFUU7w3d2hjOwbUg25EalOLsy1D8ZNy8+25YqJ0LhucnCFbAjc5
9yZsMVVTAWZ0Ylxd+1pTny9g8bYjlycCtnVNztMyUgaz+RxEEm9Fau1CpGwKY3oE
pVxz+8dkcKGkoUiXbcz4yOpw0+eN1kKOMZjcnN7FMxyqn2HLAd2M4hjAv2L2qxRq
Oz/3Abr2We492x82OE7ilQga5YRgO3ji8y2nF38+fL2wqwZ5G1BQ6dUleH684hEo
L6P15zncpaE18neQYtRQtWX015MktarQXVpxV+uED+2qOEZ6vPxDlf326LHCXhz4
gblW4RTYZI0H+wV7NdmFpvFIyMuunB/UsWvN7qYziBiGvlR1FgwWyoCXt0t7JMGB
xyH71QKRbgu3ZtMrt5Zn
=9UQh
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to