In a production environment your database server will be completely separate from your application server or at least it should be. So in theory you should never really need to change this setting unless its for your development environment.
In my case I needed to run both JBoss and Oracle on the same PC in order to test my environment. Why would I need to change the HTTP port of Oracle? Well Oracle has an HTML set of admin screens it uses as an interface to let users do DBA stuff rather than doing it from a prompt screen, on Oracle XE this is called Apex and for Oracle Enterprise, I think it’s just called Enterprise Manager or some such shit. Two different GUI’s but both use and reserve the HTTP port on your computer. Since Oracle starts before JBoss, Apache then can’t use this port to talk to JBoss.
The easiest way around this is to set the HTTP port that Oracle uses and it’s really really simple. You’ll need to have the SYSDBA priviledges for this to work, so I’ll assume as much.
Start SQLPlus and login to your server connecting as SYSDBA. Normally by default the connection will be something like: connect SYS as SYSDBA@XE etc… where XE is your service identifier – for Enterprise it’s what ever you called it on install.
Once you’ve done this then just run this command: exec dbms_xdb.sethttpport(9090);
This sets my Oracle HTTP port to 9090, something JBoss shouldn’t be using. Now I can have everything running without conflict. Apache can now see JBoss and I can still get to Oracles admin screens.