Snippets code from my daily experience

June 22, 2007

Using UTF-8 with Apache and Jboss

Filed under: apache_httpd,java,jboss,utf-8 — dafi @ 2:26 am

I’ve found a strange problem with my first real UTF-8 web application…

The urls sent in GET didn’t decoded properly and I was very astonished, my code was written correctly but the problem was present.

BTW the problem wasn’t on my code but in Jboss (in Tomcat embedded instance).

The connector must have the attribute URIEncoding otherwise the webapp never will work.

Due to the fact I use mod_jk (ie AJP13 protocol) this lifesaver attribute must be added in AJP13 connector, too

I love when problems disappear modifing only a configuration file 🙂

For sanity check I’ve added UTF-8 support also in Apache Server but I suspect this isn’t really necessary 😉

In http.conf be sure to have the AddDefaultCharset directive set as shown below

AddDefaultCharset utf-8


June 9, 2007

More Jboss on same machine (shutdown)

Filed under: java,jboss — dafi @ 9:19 am

When you run the script Jboss receives a “communication” through the NamingService port (default 1099) so if you want to stop a second Jboss instance you must modify the script adding the line shown below:


Change the port number (in example 2099) to your Jboss correct value

More Jboss on same machine (startup)

Filed under: java,jboss — dafi @ 9:11 am

Bad practice, I know…

But when it’s necessary you need to change many port numbers to allow two (or more) JBosses to cohabit together.

Take a look at JBoss port table to save many hours and spend them on another problem 😉

Blog at