Configuring Apache Tomcat to Use UTF-8

How to:

This section describes how to configure Apache Tomcat for multilingual support using UTF-8.


Top of page

x
Procedure: How to Configure Apache Tomcat for UTF-8

To configure Apache Tomcat:

  1. Navigate to the Apache Tomcat configuration folder (\conf).

    For example:

    C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf
  2. Edit the server.xml file.
  3. Add the URIEncoding="UTF-8" and useBodyEncodingForURI="true" attributes in the <Connector> element tag, as shown in the following image.

  4. Save the server.xml file.
  5. Depending on the type of operating system you are using, perform one of the following:
    • If you are using Windows, perform steps 6-9.
    • If you are using UNIX or Linux, only perform step 10.
  6. From the Windows Start menu, select All Programs, Apache Tomcat, and then click Configure Tomcat.

    The Apache Tomcat Properties dialog box opens.

  7. Click the Java tab.
  8. Enter the following parameter as the last line in the Java Options area:
    -Dfile.encoding=utf-8
  9. Click OK.

    Note: The following step is applicable only to UNIX or Linux operating systems for iWay Data Profiler Version 9.0.1.

  10. Add the following parameter to JAVA_OPTS either in .bash_profile (the profile file of the logged in user) or in the Apache Tomcat startup script file (for example, Catalina.sh):
    Dfile.encoding=utf-8

iWay Software