$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> public void doFilter(ServletRequest request, ServletResponse response,<br> FilterChain chain) throws IOException, ServletException <br>
{<br> MobileHttpServletResponse mobileResponse = new MobileHttpServletResponse((HttpServletResponse)response);<br> Mobile mobile = Mobile.getMobile((HttpServletRequest)request);<br> String meta;<br>
String docType;<br> if (mobile.isDocomo()) {<br> meta = "<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=utf-8\" />";<br> docType = "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">";<br>
mobileResponse.setContentType("application/xhtml+xml; charset=utf-8");<br> } else {<br> meta = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";<br>
docType = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>\">";<br>
mobileResponse.setContentType("text/html; charset=utf-8");<br> }<br> request.setAttribute("meta", meta);<br> request.setAttribute("docType", docType);<br> chain.doFilter(request, mobileResponse);<br>
}<br><br><div class="gmail_quote">2009/07/28 18:54 Shin Takeuchi <span dir="ltr"><<a href="mailto:s.takeuchi@leihauoli.com">s.takeuchi@leihauoli.com</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;">
$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<<a href="mailto:aoyagi_kouhei@uniquevision.jp">aoyagi_kouhei@uniquevision.jp</a>> $B$5$s$O=q$-$^$7$?(B:<br>
<div><div></div><div class="h5">> $B$*@$OC$K$J$j$^$9!#@DLx$H8@$$$^$9!#(B<br>
><br>
> sastruts 1.0.4-sp5$B$G0J2<$N$h$&$J%3!<%I$r<B9T$7$^$7$?!#(B<br>
><br>
> @Resource<br>
> protected HttpServletResponse response;<br>
><br>
> public String meta;<br>
> public String docType;<br>
><br>
> @Execute(validator = false)<br>
> public String index()<br>
> {<br>
> Mobile mobile = Mobile.getMobile(RequestUtil.getRequest());<br>
> if (mobile.isDocomo()) {<br>
> meta = "<meta http-equiv=\"Content-Type\"<br>
> content=\"application/xhtml+xml; charset=utf-8\" />";<br>
> docType = "<!DOCTYPE html PUBLIC \"-//i-mode group (ja)//DTD<br>
> XHTML i-XHTML(Locale/Ver.=ja/1.0) 1.0//EN\" \"i-xhtml_4ja_10.dtd\">";<br>
> response.setContentType("application/xhtml+xml; charset=utf-8");<br>
> } else {<br>
> meta = "<meta http-equiv=\"Content-Type\" content=\"text/html;<br>
> charset=utf-8\" />";<br>
> docType = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0<br>
> Strict//EN\" \"<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>\">";<br>
> }<br>
> return "index.jsp"<br>
> }<br>
><br>
> $B$3$N;~!"(Bdocomo$B7HBS$G8+$?;~$@$1FCJL$J(BContent-Type$B$rJV$7$?$$$N$G$9$,(B<br>
> docomo$B$G$b$=$l0J30$G$b%X%C%@!<$r3NG'$9$k$H(B<br>
> $B!V(BContent-Type: text/html;charset=UTF-8 $B!W(B<br>
> $B$H$J$C$F$7$^$$$^$9!#(B<br>
><br>
> $B$A$J$_$K!"(Breturn null;$B$K$9$k$H!"5a$a$F$$$?%X%C%@!<$,JV$C$F$-$^$7$?!#(B<br>
> jsp$B$rI=<($7$F$+$D!"%X%C%@!<$rAw=P$9$kJ}K!$O$"$j$^$9$+!)(B<br>
><br>
</div></div>> _______________________________________________<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>
><br>
><br>
<br>
<br>
<br>
--<br>
―Lei Hau'oli Co.,Ltd.―――――――――――<br>
<br>
$BC]Fb(B $B??!J(BTAKEUCHI SHIN$B!K(B<br>
Tel: 080-3300-9888<br>
Mail: <a href="mailto:s.takeuchi@leihauoli.com">s.takeuchi@leihauoli.com</a><br>
<br>
$B3t<02q<R(BLei Hau'oli<br>
$B")(B150-0001 $BEl5~ET=BC+6h?@5\A0(B4$BCzL\(B18$BHV(B6$B9f(B<br>
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>