How about just having apache httpd rewrite the http(s) for the pages you
need?  I haven't yet did our ssl implementation, but I know that I don't
want the logic in wicket.

Ryan Gravener
http://ryangravener.com/flex | http://twitter.com/ryangravener


On Fri, Apr 17, 2009 at 11:27 AM, Douglas Ferguson <
doug...@douglasferguson.us> wrote:

> That's where I got my code..
>
> I'm hitting 2 issues
>
> 1) The ssl detection/redirect isn't happening till the end of the chain and
> when it redirects it redirects back to the top.
>        Ie. Page 1 is not secure, Page 2 is secure. Page one redirects to
> Page 2.
>      If you go to page 1 then it attempts to redirect to page2 and then
> wicket redirects to Page 1 with https..
>      I would prefer to go directly to Page 2, but I can't figure out how to
> build that url..
> 2) My other issues is this:
>     else if (requestTarget instanceof IPageRequestTarget) {
>                                targetClass = ((IPageRequestTarget)
> requestTarget).getPage()
>                                                .getClass();
>                        }
>     This means that if you redirect to a Page object which you have
> constructed with special state, then this throws that object away and wicket
> will use default constructor.
>
> -----Original Message-----
> From: snoop...@gmail.com [mailto:snoop...@gmail.com] On Behalf Of Ryan
> Gravener
> Sent: Friday, April 17, 2009 10:00 AM
> To: users@wicket.apache.org
> Subject: Re: @SSLRequired
>
> maybe this is of use:
> http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html
>
> Ryan Gravener
> http://ryangravener.com/flex | http://twitter.com/ryangravener
>
>
> On Fri, Apr 17, 2009 at 10:48 AM, Douglas Ferguson <
> doug...@douglasferguson.us> wrote:
>
> > I'm implement an SSL scheme using annotations and I'm having some issues
> > with redirecting properly.
> >
> > The issue is when I have non-secured page that redirects to a secured
> page.
> >
> > I'm doing the https/http redirecting inside of a
> WebRequestCycleProcessor,
> > which works well unless there is a redirect prior to the ssl redirect. If
> > this happens then I redirect back to the top of the chain, because I'm
> using
> > the HttpServletRequest to build the url, which returns url info based on
> the
> > orginal request. I've been looking all around and I can't find any way of
> > building a url that represents the last redirect. I've tried
> >
> >
> >
> Application.get().getRequestCycleProcessor().getRequestCodingStrategy().pathForTarget(requestTarget);
> > and
> > RequestCycle.get().urlFor(requestTarget)
> >
> > Here's my current impl for The RequestCycleProcessor.
> >
> >
> >        WebRequest webRequest = (WebRequest) requestCycle .getRequest();
> >        WebResponse webResponse = (WebResponse) requestCycle
> .getResponse();
> >        HttpServletRequest httpServletRequest =
> > webRequest.getHttpServletRequest();
> >                StringBuffer url = new StringBuffer(protocol);
> >                url.append(httpServletRequest.getServerName());
> >                if(defaultPort != port){
> >                        url.append(":" + port);
> >                }
> >
> >
> >
> >
> >  url.append(webRequest.getHttpServletRequest().getContextPath());
> >                url.append(webRequest.getServletPath());
> >                String queryString =
> > webRequest.getHttpServletRequest().getQueryString();
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>

Reply via email to