struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Lea <ja...@kumachan.net.nz>
Subject Re: request.getCharacterEncoding always return null ?
Date Tue, 24 May 2005 07:50:06 GMT
 From the java docs:

getCharacterEncoding

public java.lang.String getCharacterEncoding()

    Returns the name of the character encoding used in the body of this 
request. This method returns null if the request does not specify a 
character encoding

    Returns:
        a String containing the name of the chararacter encoding, or 
null if the request does not specify a character encoding


So, the browser might not be sending the character encoding in the 
request.  I think browsers won't send the encoding when default encoding 
is used.  Some browsers might not send it at all.


Lixin Chu wrote:

>Hi,
>I always get null from request.getChaaracterEncoding(), do not know why.
>
>I am using Tomcat 5.5.7, Struts 1.1. Tested IE 6.0 and FireFox. Which
>ever encoding I select in browser, my servlet always reprots as null
>from the above call.
>
>thanks for any info!
>li xin
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>  
>

-- 
Jason Lea



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message