Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Tomcat4: Default Page Encoding UTF8

Reply
Thread Tools

Tomcat4: Default Page Encoding UTF8

 
 
Christian Hanke
Guest
Posts: n/a
 
      11-05-2003
Hi,

I am using Tomcat 4.1.27 running servlets which worked
perfectly under Tomcat 3. The problem is: (unfortunately)
the special characters (like german umlaute) are not
html encoded. Under tomcat 3 this was no problem, but with
the new tomcat the page-encoding is wrong. When I manually
change the page encoding in the browser to utf-8 everything
is OK. I could now go through all servlets and change the
content-type to charset utf-8, but I try to avoid this.
(as there where not written by me).

Is there any possiblilty the change the default page encoding
to utf-8? (like in the server.xml or so)

Thank you for any help!!!

Christian
 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      11-05-2003
Christian Hanke wrote:
> Is there any possiblilty the change the default page encoding
> to utf-8? (like in the server.xml or so)
>
> Thank you for any help!!!
>
> Christian


You can specify the default in your WEB-INF/struts-config.xml
file. I use this configuration:

<controller
contentType="text/html;charset=UTF-8"
nocache="true"
processorClass="org.apache.struts.action.RequestPr ocessor"/>

Hope this helps!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
given char* utf8, how to read unicode line by line, and output utf8 gry C++ 2 03-13-2012 04:32 AM
Converting default encoding for windows to utf8 rg.iitk@gmail.com Java 2 06-20-2005 05:29 PM
LibXML UTF8 - Input is not proper UTF-8, indicate encoding ! Vlajko Knezic Perl 1 03-06-2005 08:53 AM
Encoding.Default and Encoding.UTF8 Hardy Wang ASP .Net 5 06-09-2004 04:04 PM
open with encoding(utf8) takes forever Erik Sandblom Perl 0 05-28-2004 02:01 PM



Advertisments