Reputation: 191
My application runs in SSL now, in one of my JSP pages I have used response.sendRedirect("xyz.jsp");
, so now when redirect occurs HTTPS is converted to HTTP. How should I fix this?
Upvotes: 2
Views: 2942
Reputation: 53545
quick and dirty: add the following lines at the beginning of xyz.jsp
if(request.getScheme().equals("http")){
String redirect = "https://<your domain>/<path>/xyz.jsp";
response.sendRedirect(redirect);
}
Upvotes: 3