6 Replies Latest reply on Mar 12, 2002 4:25 PM by troydoux

    How to change Tomcat port

    parressh

      I'm using the JBoss-2.4.4-Tomcat-4.0.1 integrated package and I'm having trouble changing the port tomcat uses from 8080 to 80. Normally, modifying the server.xml would work, but it doesn't get read with the embedded Tomcat.

      I've also tried to change it in the embeddedTomcat mbean through the management console on port 8082, but it doesn't work and gets set back to port 8080 on restart.

      Does anyone know how to do this? Thanks.

        • 1. Re: How to change Tomcat port
          syzero

          JBoss will not read the server.xml of catalina(tomcat4),
          you can change the jboss.jcml file to config the port,
          find the mbean in jboss.jcml as following,



          then change it as following,


          80


          after you restart the JBoss, you will find that the port
          is changed to 80.

          syzero

          • 2. Re: How to change Tomcat port
            rsolod


            8080
            8443




            • 3. Re: How to change Tomcat port
              dplante

              Could you explain what this does?

              > code="org.jboss.web.catalina.EmbeddedCatalinaServiceSX
              > name="DefaultDomain:service=EmbeddedTomcat">
              > 8080
              > 8443
              >
              > tor
              > className="org.apache.catalina.connector.http.HttpConn
              > ctor"
              > port="8080" minProcessors="5"
              > Processors="5" maxProcessors="75"
              > enableLookups="true"
              > Lookups="true" redirectPort="8443"
              > acceptCount="10" debug="0"
              > "10" debug="0" connectionTimeout="60000"/>
              >
              >

              • 4. Re: How to change Tomcat port
                tclouser

                dplante,

                Use syzero's answer if you just want to change the http port. The second configuration setups both an http and https port (but there are quite a few additional things you would need to do to setup the SSL port).

                HTH,

                TC

                • 5. Re: How to change Tomcat port
                  luckystar_007

                  when I added
                  80


                  I found the same problem, the console message is;
                  [Service Control] Registered with server
                  [Default] java.io.IOException: org.apache.crimson.parser/P-034 server 9
                  [Default] at org.jboss.configuration.ConfigurationService.loadConfiguratio
                  n(ConfigurationService.java:268)
                  [Default] at java.lang.reflect.Method.invoke(Native Method)
                  [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
                  .java:1628)
                  [Default] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
                  .java:1523)
                  [Default] at org.jboss.Main.(Main.java:209)
                  [Default] at org.jboss.Main$1.run(Main.java:121)
                  [Default] at java.security.AccessController.doPrivileged(Native Method)
                  [Default] at org.jboss.Main.main(Main.java:117)
                  [Default] JBoss 2.2.2 Started in 0m:1s
                  [Default] Shutting down

                  maybe because the version is 2.2.2,shall I migrate to 2.4.3?

                  • 6. Re: How to change Tomcat port
                    troydoux

                    Shouldn't this be on a FAQ? I mean this is such an obvious question and so hard to figure out for a beginner
                    (it's not like you can grep for 80 or 8080 and find it in the configuration files)