English English French French Spanish Spanish German German
Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

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

Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

UTF-8 has become dominant character encoding for the web applications.

In this article, I will talk about how to configure UTF-8 in IBM WAS, Oracle Weblogic, Tomcat, TC Server & JBoss.

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 the 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 the following parameter in server.xml under Connector port.
URIEncoding="UTF-8"

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

  • Go to tomcat home (installation folder)
  • Go to bin folder
  • Add the 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 the 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 the 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/

I hope above instructions help you in configuring UTF-8 in multiple application servers.

If you are looking to enhance skills in Oracle Weblogic administration, then check out this course by Chris Parent.

Thanks to our Sponsors
More great readings on Tomcat
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder