2 Replies Latest reply on May 24, 2007 10:02 AM by defrian

    ServerBindings not working

    jcash

      I have set up a server-bindings file to change the ports that JBoss uses. This file is based on the jboss example, and some of the ports (RMI) are overridden, but the http 8080 port seams unchanged.

      Below is the tomcat section of my file. You will notice that 8080 has been changed to 10080.

      When I start JBoss and run netscan I see that port 8080 is being used by JBoss. Is there any where else that I need to change the tomcat ports?

      <!-- ********************* tomcat ********************** -->

      <service-config name="jboss.web:service=WebServer"
      delegateClass="org.jboss.services.binding.XSLTFileDelegate"
      >
      <delegate-config>
      <xslt-config configName="ConfigFile"><![CDATA[
      <xsl:stylesheet
      xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>

      <xsl:output method="xml" />
      <xsl:param name="port"/>

      <xsl:variable name="portAJP" select="$port - 71"/>
      <xsl:variable name="portHttps" select="$port + 363"/>

      <xsl:template match="/">
      <xsl:apply-templates/>
      </xsl:template>

      <xsl:template match = "Connector">

      <xsl:for-each select="@*">
      <xsl:choose>
      <xsl:when test="(name() = 'port' and . = '8080')">
      <xsl:attribute name="port"><xsl:value-of select="$port" /></xsl:attribute>
      </xsl:when>
      <xsl:when test="(name() = 'port' and . = '8009')">
      <xsl:attribute name="port"><xsl:value-of select="$portAJP" /></xsl:attribute>
      </xsl:when>
      <xsl:when test="(name() = 'redirectPort')">
      <xsl:attribute name="redirectPort"><xsl:value-of select="$portHttps" /></xsl:attribute>
      </xsl:when>
      <xsl:when test="(name() = 'port' and . = '8443')">
      <xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute>
      </xsl:when>
      <xsl:otherwise>
      <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>
      </xsl:otherwise>
      </xsl:choose>
      </xsl:for-each>
      <xsl:apply-templates/>

      </xsl:template>

      <xsl:template match="*|@*">
      <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
      </xsl:template>
      </xsl:stylesheet>
      ]]>
      </xslt-config>
      </delegate-config>

      </service-config>


        • 1. Re: ServerBindings not working
          jcash

          Found it. server.xml under deploy/jbossweb-tomcat55.sar also needs to be changed.

          • 2. Re: ServerBindings not working
            defrian

            Thats´just a workaround for the problem. I am facing the same behavior!

            The JBoss Admin Handbook says that

            XSLTConfigDelegate is used to transform services whose port/interface configuration is specified by using a nested XML fragment.


            So i am wondering why it does not work as described!

            Please help!