$B@DLx$G$9!#(B<br><br>Filter$B$H<+A0$N(BHttpServletResponse$B$r;H$C$F(B<br>$B$&$^$/$G$-$^$7$?!#(B<br><br>$BC]Fb$5$s$"$j$,$H$&$4$6$$$^$9!#(B<br><br>$B;29M$^$G$K!"%=!<%9$N0lIt$r7G:\$7$^$9!#(B<br><br>&nbsp;&nbsp;&nbsp; public void doFilter(ServletRequest request, ServletResponse response,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; FilterChain chain) throws IOException, ServletException <br>
&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MobileHttpServletResponse mobileResponse = new MobileHttpServletResponse((HttpServletResponse)response);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Mobile mobile = Mobile.getMobile((HttpServletRequest)request);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String meta;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; String docType;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (mobile.isDocomo()) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; meta = &quot;&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;application/xhtml+xml; charset=utf-8\&quot; /&gt;&quot;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; docType = &quot;&lt;!DOCTYPE html PUBLIC \&quot;-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\&quot; \&quot;i-xhtml_4ja_10.dtd\&quot;&gt;&quot;;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mobileResponse.setContentType(&quot;application/xhtml+xml; charset=utf-8&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; meta = &quot;&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html; charset=utf-8\&quot; /&gt;&quot;;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; docType = &quot;&lt;!DOCTYPE html PUBLIC \&quot;-//W3C//DTD XHTML 1.0 Strict//EN\&quot; \&quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>\&quot;&gt;&quot;;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; mobileResponse.setContentType(&quot;text/html; charset=utf-8&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; request.setAttribute(&quot;meta&quot;, meta);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; request.setAttribute(&quot;docType&quot;, docType);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; chain.doFilter(request, mobileResponse);<br>
&nbsp;&nbsp;&nbsp; }<br><br><div class="gmail_quote">2009/07/28 18:54 Shin Takeuchi <span dir="ltr">&lt;<a href="mailto:s.takeuchi@leihauoli.com">s.takeuchi@leihauoli.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
$BC]Fb!J(Bstakeuchi$B!K$G$9!#(B<br>
$B!t2#$+$i<:Ni$7$^$9!#(B<br>
<br>
SAStruts$B$GIaDL$K(BJSP$B$r;H$&>l9g(B<br>
S2RequestProcessor#processContent$B0J2<$G!V(Btext/html$B!W$,@_Dj$5$l$k$?$a(B<br>
$B$3$l$h$j$b>e0L$G(BsetContentType$B$7$J$$$H!"(B<br>
$B>e=q$-@_Dj$OHs>o$K:$Fq$G$9!#(B<br>
$B!t(BTomcat/Glassfish$BEy$rMxMQ$7$F$$$k$H2>Dj$7$F$$$^$9(B<br>
<br>
<br>
$B5U$K(BS2RequestProcessor$B$h$j$b>e0L$G@_Dj$7$F$7$^$($PNI$$$N$G(B<br>
Filter$B$r:n@.$7$F@_Dj$9$l$P;W$$DL$j$N7k2L$,=P$;$k$O$:$G$9!#(B<br>
<br>
$B$b$7$/$O!J$3$A$i$b(BFilter$BEy$rMxMQ$9$kI,MW$,$"$j$^$9$,!K(B<br>
HttpServletResponse$B$r%i%C%W$7$F!"(B<br>
$B0U?^E*$K3+H/<T$,8F$S=P$7$?;~$N$_!">e0L$N(BsetContentType$B$,8F$S=P$5$l$k$h$&$K(B<br>
setContentType$B%a%=%C%I$r(BOverride$B$7$F$7$^$&$N$bNI$$$+$b$7$l$^$;$s!#(B<br>
$B!t$3$l$G$"$l$P(BAction$B%l%Y%k$G;XDj=PMh$k$H;W$$$^$9!#(B<br>
<br>
<br>
mobylet$B$N(BMobyletFilter/MobyletResponse$B%/%i%9$,(B<br>
$B$3$N$"$?$j$N=hM}$r9T$C$F$$$k$N$G!J:#2s$N;vNc$O$^$5$K7HBS$G$9$7!K(B<br>
$B;29M$K$J$k$+$b$7$l$^$;$s!#(B<br>
<br>
<br>
2009/07/28 16:38 $B$K(B aoyogi kouhei&lt;<a href="mailto:aoyagi_kouhei@uniquevision.jp">aoyagi_kouhei@uniquevision.jp</a>&gt; $B$5$s$O=q$-$^$7$?(B:<br>
<div><div></div><div class="h5">&gt; $B$*@$OC$K$J$j$^$9!#@DLx$H8@$$$^$9!#(B<br>
&gt;<br>
&gt; sastruts 1.0.4-sp5$B$G0J2<$N$h$&$J%3!<%I$r<B9T$7$^$7$?!#(B<br>
&gt;<br>
&gt; &nbsp; &nbsp; @Resource<br>
&gt; &nbsp; &nbsp; protected HttpServletResponse response;<br>
&gt;<br>
&gt; &nbsp; &nbsp; public String meta;<br>
&gt; &nbsp; &nbsp; public String docType;<br>
&gt;<br>
&gt; &nbsp; &nbsp; @Execute(validator = false)<br>
&gt; &nbsp; &nbsp; public String index()<br>
&gt; &nbsp; &nbsp; {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Mobile mobile = Mobile.getMobile(RequestUtil.getRequest());<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; if (mobile.isDocomo()) {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; meta = &quot;&lt;meta http-equiv=\&quot;Content-Type\&quot;<br>
&gt; content=\&quot;application/xhtml+xml; charset=utf-8\&quot; /&gt;&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; docType = &quot;&lt;!DOCTYPE html PUBLIC \&quot;-//i-mode group (ja)//DTD<br>
&gt; XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\&quot; \&quot;i-xhtml_4ja_10.dtd\&quot;&gt;&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; response.setContentType(&quot;application/xhtml+xml; charset=utf-8&quot;);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; meta = &quot;&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;<br>
&gt; charset=utf-8\&quot; /&gt;&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; docType = &quot;&lt;!DOCTYPE html PUBLIC \&quot;-//W3C//DTD XHTML 1.0<br>
&gt; Strict//EN\&quot; \&quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>\&quot;&gt;&quot;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; return &quot;index.jsp&quot;<br>
&gt; &nbsp; &nbsp; }<br>
&gt;<br>
&gt; $B$3$N;~!"(Bdocomo$B7HBS$G8+$?;~$@$1FCJL$J(BContent-Type$B$rJV$7$?$$$N$G$9$,(B<br>
&gt; docomo$B$G$b$=$l0J30$G$b%X%C%@!<$r3NG'$9$k$H(B<br>
&gt; $B!V(BContent-Type: text/html;charset=UTF-8 $B!W(B<br>
&gt; $B$H$J$C$F$7$^$$$^$9!#(B<br>
&gt;<br>
&gt; $B$A$J$_$K!"(Breturn null;$B$K$9$k$H!"5a$a$F$$$?%X%C%@!<$,JV$C$F$-$^$7$?!#(B<br>
&gt; jsp$B$rI=<($7$F$+$D!"%X%C%@!<$rAw=P$9$kJ}K!$O$"$j$^$9$+!)(B<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Seasar-user mailing list<br>
&gt; <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>
&gt; <a href="https://ml.seasar.org/mailman/listinfo/seasar-user" target="_blank">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
&#8213;Lei Hau&#39;oli Co.,Ltd.&#8213;&#8213;&#8213;&#8213;&#8213;&#8213;&#8213;&#8213;&#8213;&#8213;&#8213;<br>
<br>
&nbsp;$BC]Fb(B $B??!J(BTAKEUCHI SHIN$B!K(B<br>
&nbsp;Tel: 080-3300-9888<br>
&nbsp;Mail: <a href="mailto:s.takeuchi@leihauoli.com">s.takeuchi@leihauoli.com</a><br>
<br>
&nbsp;$B3t<02q<R(BLei Hau&#39;oli<br>
&nbsp;$B")(B150-0001 $BEl5~ET=BC+6h?@5\A0(B4$BCzL\(B18$BHV(B6$B9f(B<br>
&nbsp;Tel: 03-5775-0315 Fax: 050-3488-2266<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>