Version 5

    How do I change the web server port in JBoss?

     

    By default, JBoss listens for web connections on port 8080.  This is controlled by the web server service, and is different depending on which web server you use.

     

    Tomcat 4.x (JBoss bundle <3.2.4)

     

    Find the jbossweb SAR file in your deploy directory.  (in 3.2.3, this is jbossweb-tomcat41.sar).  The Tomcat service file is  META-INF/jboss-service.xml.   Look for the HTTP connector section and

    change port="8080" to whatever value makes sense for your application.

     

    Tomcat 5.x (JBoss bundle since 3.2.4)

     

    Find the service jbossweb-tomcat50.sar in your deploy directory (it is an exploded archive).  The Tomcat service file is  server.xml.   Look for the HTTP connector section and

    change port="8080" to whatever value makes sense for your application.

     

    Tomcat 6.x (JBoss bundle since 4.2.x)

     

    Find the service jboss-web.deployer in your deploy directory (it is an exploded archive).  The Tomcat service file is  server.xml.   Look for the HTTP connector section and

    change port="8080" to whatever value makes sense for your application.

     

    Jetty

     

    Jetty can similarly be configured by editing META-INF/jboss-service.xml in the appropriate jbossweb SAR file.  However, the Jetty jbossweb SAR file is not distributed as an ExplodedDeployment, so this can be a little troublesome.  An alternative is to set the jetty.port} system property when starting the JBoss instance.  This can be done using the JAVA_OPTS environment variable.  Ex: "-Djetty.port=80"