cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: Problem with encoding non-english request parameters
Date Tue, 12 Mar 2002 08:41:01 GMT
> >>>><skipped/>
> >>Is serializer serialized request also? (this stupid question may be...)
> >>
> >
> >Do you need to set encoding on the coming request? This can be done with
an
> >action.
> >
> Yes, in action or use form-encoding attribute (in XSP page with use
> <xsp-request:> logicsheet),or use manual encoding
> like : String req=new
>
String(request.getParameter("param1").getBytes("default-charset"),"needing-c
harset");
> in some servlet pages.
> :)
> But I can change request charset in client side only?
> Can I do sets request parameters like request.setCharacterEncoding()
>
>     ^-------------in Tomcat
> But It impossible in Tomcat :( (may be :) )

I don't quite understand what do you mean.
Yes, you can change your request character set:

<quot src="servlet 2.3 Specification">
setCharacterEncoding(String)
    public void setCharacterEncoding(java.lang.String env)
        throws UnsupportedEncodingException

    Overrides the name of the character encoding used in the body of this
    request. This method must be called prior to reading request parameters
or
    reading input using getReader().
    Parameters:
        a - String containing the name of the chararacter encoding.
    Throws:
        java.io.UnsupportedEncodingException - if this is not a valid
encoding
</quot>

This should work in any Servlet 2.3 compliant server (e.g. Tomcat 4.x).

Regards,
    Konstantin Piroumian

> Yury.
>
> >
> >>Yury.
> >>
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>Please check that your question has not already been answered in the
> >>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >>
> >>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> >>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >>
> >
> >---------------------------------------------------------------------
> >Please check that your question has not already been answered in the
> >FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> >To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> >For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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