cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsui, Alban" <Alban.T...@COGNOS.com>
Subject RE: setCharacterEncoding in jsp page through cocoon?
Date Wed, 05 Mar 2003 13:37:57 GMT
Could you tell me how to use the cocoon SetCharacterEncodingAction ?

Has anyone got any solution for my other problem of setCharacterEncoding in
jsp pages?

-----Original Message-----
From: Leszek Gawron [mailto:ouzo@vip.net.pl]
Sent: 05 March 2003 13:31
To: cocoon-users@xml.apache.org
Subject: Re: setCharacterEncoding in jsp page through cocoon?


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            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org

This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message