This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.
This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Configuring Tomcat's URI encoding

All Versions
Click for all versions
Confluence 2.10 Documentation

Index

By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received from a browser. This can cause problems when Confluence's encoding is UTF-8, and you are using international characters in attachment or page names.

  1. Edit conf/server.xml and find the line where the Coyote HTTP Connector is defined. It will look something like this, possibly with more parameters:
    <Connector port="8080"/>
    
  2. Add a URIEncoding="UTF-8" property to the connector:
    <Connector port="8080" URIEncoding="UTF-8"/>
    
  3. Restart Tomcat

If you are using mod_jk

You should apply the same URIEncoding parameter as above to the AJP connector if you are using mod_jk, and add the following option to your Apache mod_jk configuration:

<Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8"/>
JkOptions +ForwardURICompatUnparsed

More information using Apache with Tomcat

For comprehensive examples of how to use Tomcat and Apache with Confluence, see Running Confluence behind Apache.

Labels

apache apache Delete
tomcat tomcat Delete
uri uri Delete
url url Delete
encoding encoding Delete
unicode unicode Delete
international international Delete
i18n i18n Delete
connector connector Delete
mod_jk mod_jk Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 15, 2007

    Michael Bushe says:

    One of these goes in Tomcat's config, the other in Apache's.  This line&nb...

    One of these goes in Tomcat's config, the other in Apache's. 

    This line <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8"/>goes in <tomcat>/conf/server.xml

    This line:JkOptions +ForwardURICompatUnparsed
    goes in  <apache>/conf/httpd.conf
     (or <apache>/conf/httpd.include if you use an include file. It can go inside the <VirtualHost> element.

  2. Jul 13, 2007

    Stefan Baader says:

    hint to JBoss admins This is also necessary if you are running *JBoss* ...

    hint to JBoss admins

    This is also necessary if you are running *JBoss* with tomcat inside.
    If you have problems with attachments' file names containing umlauts or special characters like döner.jpg this will be the right way.

    Inside JBoss you'll find the tomcat server.xml here: 

    <jboss home>/server/default/deploy/jbossweb-tomcat55.sar/server.xml 

    Example for the configuration for port 8080: 

          <!-- A HTTP/1.1 Connector on port 8080 -->
          <Connector port="8080" address="${jboss.bind.address}"
             maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
             emptySessionPath="true"
             enableLookups="false" redirectPort="8443" acceptCount="100"
    	 connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />
     

  3. Nov 26, 2007

    Anonymous says:

    The URIEncoding attribute didn't appear to do anything for me, however, ensuring...

    The URIEncoding attribute didn't appear to do anything for me, however, ensuring the HttpServletRequest's character encoding was set to "UTF-8"BEFORE, and this is key, trying to read any parameters from the request did work.

    This was in a sandbox test of posting a form directly to a servlet URI, however my next step is getting it to work in Struts on a Tomcat instance running behind an Apache server where that attribute may be necessary.

    --adam 

Add Comment