Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

How to setup Tomcat 5.0 or Tomcat 5.5 so that jsp's are returned to the browser as UTF-8 Page Encodeing.

Hello All,

I am having an issue getting tomcat to encode the response stream as UTF-8
I have set my page header to
<%@ page contentType="text/html; charset=UTF-8" %>

also tried adding pageEncoding="UTF-8" but that did not work.

I have set the -Dfile.encoding=UTF-8 in the Catalina.bat (Yes I am using Windows)

For some reason the pages are all returning as ISO-8859-1 when I send to my deployment server but when I run it on my devbox from JBuilder it works just fine.

ANy help would be great.

Thanks.
0
infocapital
Asked:
infocapital
  • 2
1 Solution
 
bloodredsunCommented:
Check your server.xml for an element called "DecodeInterceptor"

Also, check out this, http://jakarta.apache.org/tomcat/faq/misc.html#tomcat5CharEncoding
0
 
bloodredsunCommented:
Or putalter your server.xml to set URIEncoding

    <Connector port="8000" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" URIEncoding="UTF-8" disableUploadTimeout="true" />

as mentioned here:

http://jira.opensymphony.com/browse/WW-690
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now