Struts 2 Encoding Problems
Struts2での文字化け問題に関し
調べたらよく出る解決方法は、EncodingFilterを使用すること。
但し、そうやっても利かないことがあるね。その理由:
struts.propertiesに、以下の設定がある
struts.i18n.encoding=Shift_JIS
こいつの効果は、StrutsPrepareというFilterに果たされる。
なので、Encoding Filterをその前に置いても、意味がない。
また、注意点として、使っているブラウザーではcacheingが行われると、
ソースを変更しても、反映されないことがある。
それに、ブラウザー設定にてcachingしないを指定できれが、tomcatのcontext.xmlに
<!-- The contents of this file will be loaded for each web application --><Context cachingAllowed="false">
を追加すればよい
調べたらよく出る解決方法は、EncodingFilterを使用すること。
但し、そうやっても利かないことがあるね。その理由:
struts.propertiesに、以下の設定がある
struts.i18n.encoding=Shift_JIS
こいつの効果は、StrutsPrepareというFilterに果たされる。
なので、Encoding Filterをその前に置いても、意味がない。
また、注意点として、使っているブラウザーではcacheingが行われると、
ソースを変更しても、反映されないことがある。
それに、ブラウザー設定にてcachingしないを指定できれが、tomcatのcontext.xmlに
<!-- The contents of this file will be loaded for each web application --><Context cachingAllowed="false">
を追加すればよい
Comments
Post a Comment