tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: From HTTP to HTTPS request.getHeader("referer")
Date Mon, 03 Nov 2014 19:23:19 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Léa,

On 11/2/14 12:34 PM, Léa Massiot wrote:
> Hi again. It looks like "sendRedirect()" is working if I pass it a
> HTTPS URL as an argument:
> 
> ----------------------------------------------------- String s_prov
> = request.getScheme() + "://" + request.getServerName() +
> request.getContextPath() + "/" + "example1.jsp";
> 
> response.sendRedirect(s_prov); 
> -----------------------------------------------------
> 
> Nota: in my case, "request.getScheme()" is equal to "https".
> 
> I think I'm going back to "sendRedirect()"... Snif :'/, it's a lot
> of matches to replace back (from "forward()" to 
> "sendRedirect()")...

If you want to switch protocols, then you will have to build the
entire URL including the protocol.

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

iQIcBAEBCAAGBQJUV9YnAAoJEBzwKT+lPKRY6IIP/iM8zeEPhqVKX69XpLDm/7kF
SFegFsT2dCQIXA1UhhS6soW7T/7pC92iBFXxJZ6quYG3wHx+mmY5tarb+jpShNo7
FhO+0pKwhV2cixSbXV1mISaheDDfx1PIA7CBRyL9LtA2cioLAxJKdIaMgRQYN2cd
FEjqRhpHWKQXYT1CmHNz80FcArVCKMy3UnXMUZbe/XOpNmHRCemS/pAFAtaHm7EV
hiej35ztAAUJm5UGq0VhAL61of3ij1sHFthbH4lupc11HWIOqz+pl9KnByYmbIBf
ZOJM8Ydma2/41BurVs/vrunqHRI4kNTi475I+xkjt/nYLXuStqsb3D0t7qKtdfkl
R02jPFEq76MSvUoe2h73awOfPzddSeMDpwt+ld9BMltOwtsFdqNC6dXXQHB5O4yM
y4ov0EIOK0WLgqqhebMquQ1JgIu8+6C3FW7z8HWIRCgkUUl6MaiYJQNTCAIiVYyI
a0yKafVBk2nPCWNf2TxOy+yi4AT2SYnCpEsac9wCpracS/cfF7A3N/iJC5bkW+hS
s91Y5O7E+p+iD46mT0i3BsiB0V7cVlDWd5I/I0P/dRB7dDUcxKIgnqMAWDGyswxe
AU8DNTsWwYSpX51Awq0WkSmInbIgPRRZ8iuY4t7vy5zmB8gHV52zglbH8wsGvnQF
BstMynBcam41fi62FgTW
=9dkF
-----END PGP SIGNATURE-----

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


Mime
View raw message