Hi Josip.

Have you tried doing exectly what you yourself suggested? ;-)
In T3 I use something like this:

public abstract class AppBasePage extends BasePage implements 
PageValidateListener
{
    public void pageValidate(PageEvent event)
    {
        // ssl?
        RequestContext requestContext = 
event.getRequestCycle().getRequestContext();
        if (!requestContext.getScheme().equals("https"))
        {
            // no, so redirect
            String url = "https://"; + requestContext.getServerName();
            if (requestContext.getServerPort() == 8080)
            {
                url += ":8443"; // to handle debugging
            }
            url += requestContext.getRequestURI();
            throw new RedirectException(url);
        }
    ...
    }
}

Cheers,
Nick.


Josip Gracin wrote:
Hello!

Is there a way to ensure that a page can be accessed only via HTTPS scheme, but relying only on Tapestry mechanisms, i.e. not using Tomcat etc.?

Ideally, I would like to redirect an HTTP request in pageValidate() of a page to the same page but via HTTPS.

Thanks in advance!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to