tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: character encoding issue
Date Mon, 15 Dec 2003 14:52:25 GMT
Right yes - that would be it then.

Thanks
Adam

On 12/15/2003 01:18 PM Stefanos Karasavvidis wrote:
> there is an issue lately with character encodings when sent as HTTP GET. 
> look for example in the developer list the "[5.0] content-type and 
> charset issues" thread.
> 
> Try using POST in your form and if this solves your problem, then you're 
> hit by it.
> 
> sk
> 
> Adam Hardy wrote:
> 
>> This is something I thought I had sorted out but somehow it popped its 
>> ugly head up again today.
>>
>> I have tomcat 5.0.16 and I'm setting the character encoding for my 
>> JSPs in the web.xml with the new config mechanism:
>>
>>   <jsp-config>
>>     <jsp-property-group>
>>       <description>All JSPs</description>
>>       <url-pattern>/WEB-INF/general/*</url-pattern>
>>       <el-ignored>false</el-ignored>
>>       <page-encoding>UTF-8</page-encoding>
>>       <is-xml>false</is-xml>
>>     </jsp-property-group>
>>   </jsp-config>
>>
>> That handles the response and I fix the request by setting all request 
>> character encoding in a filter.
>>
>> I have this simple JSP scriptlet:
>>
>> <%
>>   String role = request.getParameter("role");
>>   if (role == null)
>>     role = "";
>>   if (role.length() > 0) {
>>     if (request.isUserInRole(role)) {
>> %>
>>       You have been granted role <strong><%= role %></strong><br
/><br />
>> <%
>>     }
>> %>
>>
>> But the JSP destroys my German characters like ä, ö & ü.
>>
>> I put debug output in the JSP with the following:
>>
>> request.getCharacterEncoding();
>> response.getCharacterEncoding();
>>
>> It shows UTF-8 for both.
>>
>> This does however setup work for my servlets, which successfully input 
>> & output the German characters between the browser and the database.
>>
>> What am I doing wrong anybody?
>>
>> Thanks
>> Adam
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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


Mime
View raw message