Hmm...is there a better way?  I don't want to do anything
container/app-server specific, honestly.

I found this:

http://old.nabble.com/302-vs.-301-Redirect-ts14156515.html#a14156515

Is there still no way to perform a 301 redirect?  Any alternatives?

On Tue, Jan 5, 2010 at 9:35 AM, Martin Makundi <
[email protected]> wrote:

> It's jetty specific. You have to look at sources if this resolution
> works for you.
>
> **
> Martin
>
> 2010/1/5 VGJ <[email protected]>:
> > Is "HttpStatus" Jetty-specific?  I'm unable to resolve the class.  I'll
> see
> > if I can somehow piece this together on the Glassfish side.
> >
> > Thanks.
> >
> > On Tue, Jan 5, 2010 at 9:10 AM, Martin Makundi <
> > [email protected]> wrote:
> >
> >> In WicketApplication.init()
> >>
> >> 2010/1/5 VGJ <[email protected]>:
> >> > You'll have to forgive my ignorance - where in your app do you do
> this?
> >> >
> >> > On Tue, Jan 5, 2010 at 8:55 AM, Martin Makundi <
> >> > [email protected]> wrote:
> >> >
> >> >> This is what we do with jetty:
> >> >>
> >> >>    try {
> >> >>      // Force 302 redirect status code into 301 'permanent redirect'
> >> >>      Field statusField =
> >> >> HttpStatus.class.getDeclaredField("__responseLine");
> >> >>      statusField.setAccessible(true);
> >> >>      Buffer[] responseLine = (Buffer[])
> >> statusField.get(HttpStatus.class);
> >> >>      byte[] bytes = responseLine[302].toString().replace("302",
> >> >> "301").getBytes();
> >> >>      responseLine[302] = new
> >> >> ByteArrayBuffer(bytes,0,bytes.length,Buffer.IMMUTABLE);
> >> >>    } catch (Exception e) {
> >> >>      Utils.errorLog(getClass(), e);
> >> >>    }
> >> >>
> >> >>
> >> >> 2010/1/5 VGJ <[email protected]>:
> >> >> > Along with all of the SEO stuff I'm working on these days - I'm
> being
> >> >> asked
> >> >> > to use 301 redirects on the sites we're optimizing.  How would this
> be
> >> >> done
> >> >> > in with Wicket?  Are there alternatives, if not?
> >> >> >
> >> >> > Thanks!
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> 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]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to