A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Redirecting to HTTPS
Joined: Mar 25, 2008
Mar 25, 2008 07:36:00
How to make secure my page by redirecting to "https" from "http" request?
Joined: Dec 11, 2004
Mar 25, 2008 07:53:00
You can do it declaratively with security-constraint entries in web.xml or
you can do it programmatically by reading the isSecure property from the request object and redirecting to the secure version of you page yourself.
Filters are a nice place to put this code.
How to ask a question...
Simple Servlet Examples
Joined: Mar 22, 2005
Mar 25, 2008 07:58:00
Welcome to JavaRanch.
Adding a security constraint like the following to your web.xml will require HTTPS for all URLs:
<security-constraint> <web-resource-collection> <web-resource-name>Entire Application</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
Ping & DNS
- my free Android networking tools app
I agree. Here's the link:
subject: Redirecting to HTTPS
problem with prepared statement
How is jsessionId handled when moving from http --> https?
Tomcat session sharing - url rewrite and switching from http to https
how to redirect from HTTPS to HTTP
Servlet and data security and authantication
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014