Hello,

These solutions force struts users to use struts controller servlet and
struts tag libraries. This isn't my case, I think this is a problem for
simple webapps, that use struts only for i18n (does such webapps
exist?:). What about my solution in struts-dev "i18n and <form:htlm>"?

Cheers,
Kare 8^)

"Craig R. McClanahan" wrote:
> 
> Pierre Métras wrote:
> 
> > Hi,
> >
> > The locale negociation to display localized messages occurs in the
> > ActionServlet. So, a Struts application will not display localized messages
> > before the first action.
> >
> > How can we negociate the locale desired by the user with the very first page
> > displayed?
> >
> > Do we need a <setLocale> tag, so we can write an index.jsp page like the
> > following:
> > <html>
> >     <head>
> >         <setLocale />
> >         <logic:forward name="firstPage" />
> >     </head>
> > </html>
> > But this is not good because we have a configuration flag in web.xml and a
> > tag for the first page...
> >
> > Or should each localizing tag check if the negociation has already occured,
> > instead of ActionServlet?
> >
> 
> This is certainly one approach -- and would be especially useful if people tend
> to bookmark a page within your app rather than entering at the "front".
> 
> For the latter sort of people, one other strategy would be to declare a "welcome
> page" for your application that actually invokes the controller servlet, so that
> you get locale negotiation even the first time.
> 
>     <welcome-file-list>
>         <welcome-file>setup.do</welcome-file>
>     </welcome-file-list>
> 
> (I'm not sure every servlet 2.2 container supports a servlet as the welcome
> page, but it's required in 2.3.)
> 
> >
> > What do you think?
> >
> > Pierre Métras

-- 
Kare Nuorteva, Software Engineer
Satama UK Ltd
mobile +44 7989 852 865
http://www.satama.com/

Reply via email to