This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Best way to check for https

Oct 4th, 2004, 07:08 AM

I am using apache/jboss, and I have just configured apache for ssl. I can now access my web app pages either using http or https.
Obviously, for pages that need to be secure, I need to make sure that they are accessed via https and not http.
The only way I can see to do this is to write an interceptor which examines the requestURL and checks to make sure it starts with https.
I guess this would work, but it feels like a bit of a kludge.
Is there a better way?
Sorry this isn't a very 'spring' question - I'm not sure where else to ask.