Skip navigation

Tag Archives: XML

In your JBoss server there is a file that can be amended to alter the URI encoding and the number of threads used by JBoss. Additionally if you’re using mod_JK to link Apache HTTP and JBoss/Tomcat you can specify a JVM route parameter here that allows Apache to route incoming requests to the correct node.

To do this we need to look at the following file:

\jboss\server\[SERVER NAME]\deploy\jbossweb-tomcat55.sar\server.xml

In here we can amend a couple of parameters and add in a few extra values. For thread numbers and URI encoding look in the file

Adding and changing Mod JK JVM route, URI encoding and thread settings for JBoss

If you need to run Java 1.5 in your JSP’s in JBoss 4.0.5.GA you can do so by editing a small setting in an XML file in your server directory:

\jboss\server\[SERVER NAME]\deploy\jbossweb-tomcat55.sar\conf\web.xml

You can then change the compiler version by un-commenting the code below which you will find in the web.xml.

Setting the JDK version and compiler in JBoss for JSP pages

To run multiple Jboss instances on the one server is pretty easy – but remember that if you’re running something like ATG commerce you’re going to need a few Gb of memory to run just the one JBoss instance let alone multiples. So you may want seriously consider keeping separate VM’s for each server in your production environment depending on your application requirements e.g for heavyweight commerce keep them all as separate as possible. But for quickly building a development environment this is the way to go.

Anyway, the main thing to worry about with JBoss is the network ports setting as each instance needs it’s own port range, once you’ve done this then it’s all down to your application as to which port set it needs to use. So here’s how to set multiple instances and their respective ports. You’ll see that most if not all config for JBoss is done with XML files.

Running multiple instances of Jboss on one server.

Why would you need to do this? Well for instance if you were using 3rd party AJAX APIs and you wanted to capture the data from them perhaps, or maybe you just have a complex form.

Or you could use this for form validation to return errors from the server without refreshing the browser, for example, if the data already exists in a database you could let the user know.

Either way its pretty simple. Basically we just use javascript to post the form object over http to a serverside page – e.g. PHP, JSP, ASP etc…

More here: Using Javascript/ AJAX to post HTML form data

Recently I had to build a system that would take an address, pass it to google and return latitude and longitude values. The result is then stored for later use and display on Google maps.

However, firstly I found that the default XML geocoding service provided by Google that allows you to do bulk geocoding on a data source and the geocoding provided by their maps API/ AJAX library (GClientGeocoder) had huge differences in results. Most postal codes passed to googles XML geocoding service were miles out or just not recognised. Yet when using the same postcode in the maps API when calculated on the fly the results were more or less spot on.

More here:Google Maps API part 1: Accurate Geocoding for UK Postcodes