tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terence M. Bandoian" <tere...@tmbsw.com>
Subject Re: From HTTP to HTTPS request.getHeader("referer")
Date Tue, 04 Nov 2014 00:54:45 GMT
On 11/2/2014 11:34 AM, 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()")...
>
> Best regards.


Hi, Léa-

I'm not sure how you're using it but it's worth pointing out that 
response.sendRedirect "Sends a temporary redirect response to the 
client..."  The client (browser) must then send another request to the 
server before any additional processing takes place.  In contrast, 
pageContext.forward takes place entirely on the server.

-Terence Bandoian


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


Mime
View raw message