Re: redirecting a non-secure request to one that uses https

2007-07-11 Thread Toni Lyytikäinen
Google is your friend, http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpServletResponse.html#sendRedirect(java.lang.String) You can get the URL with a method in the HttpServletRequest class, getRequestURL(), substitute "https" for "http" in there and redirect to that page w

Re: redirecting a non-secure request to one that uses https

2007-07-10 Thread Session A Mwamufiya
Hi Tony, Thanks for the reply. I use an interceptor to check the HttpServletRequest's isSecure() method in order to determine it if is secure or not. I've never used the HttpServletResponse object and I'm not sure how to redirect to the same address but with https. The redirecting won't be t

Re: redirecting a non-secure request to one that uses https

2007-07-10 Thread Toni Lyytikäinen
It may be an ugly hack, but it has worked for some of my actions. If you return null instead of the action name to be invocated, you can use a response object to send information directly to the user. The HttpServletRequest object has method isSecure() which you can use to determine whether the re

redirecting a non-secure request to one that uses https

2007-07-10 Thread Session A Mwamufiya
Hi All, I've installed SSL on my JBoss container (it works) and have created an interceptor that checks that the requests to my web app are secure (using https). I would like to redirect all non-secure requests to use ssl and have https in the address. How can this be done? I'm not sure how