Tomcat4: Default Page Encoding UTF8

  • Thread starter Christian Hanke
  • Start date
C

Christian Hanke

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
 
S

Sudsy

Christian said:
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.RequestProcessor"/>

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top