On śro, mar 05, 2003 at 08:22:55 -0500, Tsui, Alban wrote:
> Hi
>
> I have cocoon 2.0.3 serving xsp pages, custom generator pages and jsp pages.
> Jsp pages are done via the jsp reader:
>
> <map:match pattern="*/*">
> <map:act type="setutf8encoding"/>
> <map:read type="jsp"
> src="/admin/lang/{1}/jsp/{2}.jsp" mime-type="text/html" />
> </map:match>
>
> I have created a simple action to setCharacterEncoding to utf-8 for all my
> pipelines and it works for my xsp pages etc.... except for the above
> pipeline. If I have some japanese parameters going through the request
> object in jsp, the text gets corrupted ... so for some reasons,
> setCharacterEncoding doesn't work in jsp pages.
>
> My action is something like:
>
> public java.util.Map act(org.apache.cocoon.environment.Redirector
> redirector, org.apache.cocoon.environment.SourceResolver sourceResolver,
> java.util.Map map, String str,
> org.apache.avalon.framework.parameters.Parameters parameters) throws
> java.lang.Exception
> {
> // Grab request object
> Request request = ObjectModelHelper.getRequest(map);
> request.setCharacterEncoding("utf-8");
> return null;
> }
Apart from your problem: there is no need do implement another action. Ses
SetCharacterEncodingAction (it's already there)
ouzo
--
__
| / \ | Leszek Gawron // \\
\_\\ //_/ [EMAIL PROTECTED] _\\()//_
.'/()\'. Phone: +48(600)341118 / // \\ \
\\ // recursive: adj; see recursive | \__/ |
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]