Damn!

Looks like WicketFilter is only available in 1.3. :-(



> -----Original Message-----
> From: David Leangen [mailto:[EMAIL PROTECTED]
> Sent: 16 August 2007 20:56
> To: [email protected]
> Subject: RE: Caching the context path
>
>
>
> Jan,
>
> Thanks! This sounds just like what I need.
>
> Can I ask: on what context path did you mount your wicket? You must have
> mounted it on "/*", right?
>
>
> Cheers,
> Dave
>
>
>
> > -----Original Message-----
> > From: Jan Kriesten [mailto:[EMAIL PROTECTED]
> > Sent: 16 August 2007 19:02
> > To: [email protected]
> > Subject: Re: Caching the context path
> >
> >
> >
> > Hi David,
> >
> > what you're doing with different brandings I do similar for
> > different languages
> > with Wicket 1.3.
> >
> > I want www.xy.de/de/ map to german and www.xy.de/en/ map to
> > english interface of
> > the application.
> >
> > What I did was extending WicketFilter to support path-extensions. I just
> > implemented:
> >
> >   public String getRelativePath( HttpServletRequest request )
> >   {
> >     String relPath = super.getRelativePath( request );
> >     int idx;
> >     int len = relPath.length();
> >
> >     if( len > 2 && (idx = relPath.indexOf( '/' )) >= 0 )
> >     {
> >       String lang = relPath.substring( 0, idx ).toLowerCase();
> >
> >       Locale locale = availableLocales.get( lang );
> >       if( locale != null )
> >       {
> >         relPath = len > lang.length() ? relPath.substring(
> > lang.length() + 1 ) : "";
> >         request.setAttribute( LANG_ATTRIBUTE, locale );
> >       }
> >     }
> >     return(relPath);
> >   }
> >
> > So, this takes the first part of the relativePath from the
> > request and checks if
> > I have a supported language for it. If so, I set the Locale in the
> > request-Attributes and my Application can access that.
> >
> > Something similar might work for you.
> >
> > Best regards --- Jan.
> >
> >
> > ---------------------------------------------------------------------
> > 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