Menu

 

IT Infrastructure Blog                                    

Provide an Articles and Tutorials                                    

Free Tutorials Subscription!

Free Course: Do you like reading White Papers, Magazine, eBooks, Video Tutorials? Just enter your email below to receive...

UTF-8 Configuration in WebSphere, WebLogic, Tomcat, TC Server, JBoss

UTF-8 has become dominant character encoding for the web applications. In this article, I will talk about how to configure UTF-8 in WebSphere application Server, Oracle Weblogic Server, Tomcat, TC Server, JBoss Application Server.

WebSphere Application Server

  • Login into WebSphere Administrative Console
  • Expand Servers >> Application Servers
  • Click on Application Server (JVM) you want to enable UTF-8
  • Expand Java and Process Management under Server Infrastructure
  • Click on Process Definition
  • Click on Java Virtual Machine
  • Add following parameter in Generic Java Arguments
-Dclient.encoding.override=UTF-8
  • Click Ok, Sync the node if applicable
  • Restart Application Server (JVM) for changes to take effect.

Oracle WebLogic Server

  • Go to Weblogic Domain path
  • Go to bin folder
  • Add following parameter in setDomainEnv.sh under JAVA_OPTS variable.
-Dfile.encoding=utf8
  • Restart Weblogic server for changes to take effect.

Tomcat

  • Go to tomcat home (installation) folder
  • Go to conf folder
  • Add following parameter in server.xml under Connector port.
URIEncoding="UTF-8"

Note: if you have multiple Connector port, you must add them under all.

  • Go to tomcat home (installation folder)
  • Go to bin folder
  • Add following parameter in catalina.sh under JAVA_OPTS variable.
-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

Ex: 
JAVA_OPTS=”-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8”
  • Restart Tomcat Server for changes to take effect.

TC Server

  • Go to TC Server instance folder
  • Go to conf folder
  • Add following parameter in server.xml under Connector port.
URIEncoding="UTF-8"
  • Go to TC Server instance folder
  • Go to bin folder
  • Add following in setenv.sh under CATALINA_OPTS variable
-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

Ex:
CATALINA_OPTS="-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8"
  • Restart TC Server for changes to take effect.

JBoss Application Server

  • Go to JBoss installation path
  • Go to bin folder
  • Add following parameter in standalone.conf under JAVA_OPTS
-Dfile.encoding=UTF-8
  • Restart JBoss Server for changes to take effect.

UTF-8 Validation Tools

You can use following online tool to validate if your web application is UTF-8 supported

http://coderstoolbox.net/string/

http://validator.w3.org/

back to top