27.10.2014 - Here is the snippet which should be added to your web.xml . If yes then redirect it to requested page otherwise redirect user to login.jsp. for example: String var= null; try this really best way to convert HTTP request into HTTPS request..