Results 1 to 3 of 3

Thread: Best way to check for https

  1. #1
    Join Date
    Aug 2004
    Location
    Carlisle, UK
    Posts
    184

    Default Best way to check for https

    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.
    Chris Harris
    Carlisle, UK

  2. #2
    Join Date
    Aug 2004
    Location
    Roselle Park, NJ
    Posts
    167

    Default

    There is a feature in the Acegi Framework that ensures that any URLs you determine to be https will be redirected to HTTPS if they are accessed via http.

    The javadoc for the class is here: http://www.monkeymachine.co.uk/acegi...ingFilter.html

    The reference page is here:
    http://www.monkeymachine.co.uk/acegi...urity-channels

  3. #3
    Join Date
    Aug 2004
    Location
    Carlisle, UK
    Posts
    184

    Default

    I plan to look further at Acegi when I have time . . .
    In the meantime it's pointed me in the right direction - the isSecure() method of ServletRequest is what I'm looking for.

    Thanks
    Chris Harris
    Carlisle, UK

Similar Threads

  1. How to check errors for a form field?
    By java.public@gmail.com in forum Web
    Replies: 2
    Last Post: Oct 12th, 2005, 07:19 PM
  2. Check out from CVS problems
    By codecraig in forum Swing
    Replies: 2
    Last Post: May 20th, 2005, 07:44 PM
  3. how can I check conflicts on updating?
    By creatxr in forum Data
    Replies: 5
    Last Post: May 10th, 2005, 03:58 AM
  4. Replies: 3
    Last Post: Oct 21st, 2004, 05:08 PM
  5. SimpleFormController security check
    By bobmanc in forum Web
    Replies: 7
    Last Post: Aug 20th, 2004, 06:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •