$B>.NS$5$s!"(B<br><br>Thanks for your reply,<br><br>I got the solution from your reply.<br><br><br><br><br><br><br><div class="gmail_quote">2009/5/20 Koichi Kobayashi <span dir="ltr"><<a href="mailto:koichik@improvement.jp">koichik@improvement.jp</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">$B>.NS(B (koichik) $B$G$9!%(B<br>
<br>
Date: Wed, 20 May 2009 00:04:24 +0900<br>
From: thomas <<a href="mailto:jp.mcy.10@gmail.com">jp.mcy.10@gmail.com</a>><br>
To: <a href="mailto:seasar-user@ml.seasar.org">seasar-user@ml.seasar.org</a><br>
Subject: [Seasar-user:17488] [Teeda] $B%"%W%j$N<BAu$G%m%1!<%k$rJQ99$9$k$3$H(B<br>
<div class="im"><br>
> if*<br>
> (request.getLocale().getLanguage().equals((String)session.getAttribute("language"))<br>
> *){<br>
> System.out.println("same");<br>
> * chain.doFilter(request,response);*<br>
> return;<br>
> }<br>
> else{<br>
><br>
</div>> *//How can i change the locale here*<br>
<br>
I wrote in [Seasar-user:17460]<br>
> > 2. Filter create a wrapper for an HttpServletRequest.<br>
> > 3. getLocale() and getLocales() methods of the wrapper<br>
> > return the Locale from an HttpSession.<br>
<br>
then<br>
<br>
final Locale locale = new Locale((String) session.getAttribute("language"));<br>
request = new HttpServletRequestWrapper((HttpServletRequest) request) {<br>
public Locale getLocale() {<br>
return locale;<br>
}<br>
public Enumeration getLocales() {<br>
Vector v = new Vector();<br>
v.add(locale);<br>
return v.elements();<br>
}<br>
};<br>
<br>
<br>
<br>
<br>
--<br>
<component name="koichik"><br>
<property name="fullName">"Koichi Kobayashi"</property><br>
<property name="email">"<a href="mailto:koichik@improvement.jp">koichik@improvement.jp</a>"</property><br>
<property name="blog">"<a href="http://d.hatena.ne.jp/koichik" target="_blank">http://d.hatena.ne.jp/koichik</a>"</property><br>
</component><br>
<br>
_______________________________________________<br>
Seasar-user mailing list<br>
<a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
<a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
</blockquote></div><br>