Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run Jboss on port other than 8080

 
Saurabh Vyas
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Norman and Sam, first I congratulate on your new book.
I have a two questions in JBoss and I think here only i should ask question to participate in "JavaRanch Book Promotion".

Qs1 : How to configure Jboss to run on some other port (except 8080) so that in URL to access our web application we need not mention the port number, also we have not to use port 80 ( which helps in achieving this functionality ). So basically my question is how to set Port redirection in Jboss ?

Qs2 : Can we run more than one instance of Jboss on same machine, like we can do for tomcat by setting Catalina home and catalina base ?

Regards
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To change the HTTP connector for Tomcat (the web container deployed with JBoss) update the value in %JBOSS_HOME%/server/[server_name]/deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml.

Yes you can run as many instances of JBoss as you like, so long as there are no port conflicts. The easieast way to do that is to use the ServiceBindingManager MBean. Have a look at the sample-bindings.xml file which comes with the JBoss examples.
 
norman richards
Author
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 4.1? You have a really old JBoss. Look for the server.xml file in the jbossweb-tomcat50.sar or jbossweb-tomcat55.sar directory. (depending on the version you are using)

In addition to the binding manager, you can also use "run -b <ip number>" to bind only to one address, allowing you to run multiple JBoss instances easily.
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the latest release of JBoss (4.0.2), you need to edit the server.xml file located in $jboss_home/server/default/deploy/jbossweb-tomcat55.sar (assuming you are using the default configuration.

In that file, you need to change the port attribute in the Connector entry. e.g.

<Server>
<Service name="jboss.web"
className="org.jboss.web.tomcat.tc5.StandardService">

<!-- Change this value to the port you want to use. -->
<Connector port="8080"
...
 
Saurabh Vyas
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for your response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic