Gareth Jones wrote:

> When using HttpServletResponse.encodeRedirectURL(String), is there any
> J2EE method to tell it to switch protocols(http - https)?  Can this be
> done at redirect time?  Is a custom method the answer?
>

The argument to encodeRedirectURL() can be an absolute URL, so why not just
include the new protocol?  For example, if you are currently executing the
non-secure page, redirect to something like this:

    String url =
      response.encodeRedirectURL("https://myhost/myapp/index.html");
    response.sendRedirect(url);

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to