I have a login page that I would like to show in https. After validating the user, I would like to transfer him back to http. So I declared in web.xml
<security-constraint> ...
String urlPath = "http://hostname:portno/filepath.pdf"; url = new URL(urlPath); URLConnection ...