Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-5505

Custom web context path doesn't work

XMLWordPrintable

      I am trying to expose the web console at https://companyhostname/artemis. Basically i want the context of the web console to start with /artemis. I changed my bootstrap.xml as follow:
      <broker xmlns="http://activemq.org/schema">
      <jaas-security domain="activemq"/>
      <server configuration="file:/C:/Users/nle/ActiveMQ/mybroker2/etc//broker.xml"/>

      <web bind="http://0.0.0.0:8161" path="web">
      <app url="artemis/activemq-branding" war="activemq-branding.war"/>
      <app url="artemis/artemis-plugin" war="artemis-plugin.war"/>
      <app url="artemis/console" war="console.war"/>
      </web>
      </broker>

      Running this on localhost for testing, when I hit
      http://localhost:8161/artemis/console/
      I got redirected to the login screen which means the context of the console app has been prefixed with /artemis correctly.
      However, i see that all the css from artemis-branding and js from artemis-plugin are missing and the request for artemisPlugin.js does not start with /artemis as i set in my bootstrap.xml. I believe the cause of this is from the return of the http://localhost:8161/artemis/console/plugin (io.hawt.web.plugin.PluginServlet):

      {
         "artemis-plugin":{
            "Context":"\/artemis-plugin",
            "Scripts":[
               "plugin\/js\/artemisHelpers.js",
               "plugin\/js\/artemisPlugin.js",
               "plugin\/js\/components\/addressSendMessage.js",
               "plugin\/js\/components\/addresses.js",
               "plugin\/js\/components\/browse.js",
               "plugin\/js\/components\/connections.js",
               "plugin\/js\/components\/consumers.js",
               "plugin\/js\/components\/createAddress.js",
               "plugin\/js\/components\/createQueue.js",
               "plugin\/js\/components\/deleteAddress.js",
               "plugin\/js\/components\/deleteQueue.js",
               "plugin\/js\/components\/diagram.js",
               "plugin\/js\/components\/help.js",
               "plugin\/js\/components\/navigation.js",
               "plugin\/js\/components\/preferences.js",
               "plugin\/js\/components\/producers.js",
               "plugin\/js\/components\/queues.js",
               "plugin\/js\/components\/sendMessage.js",
               "plugin\/js\/components\/sessions.js",
               "plugin\/js\/components\/status.js",
               "plugin\/js\/components\/tree.js",
               "plugin\/js\/services\/pagination.js",
               "plugin\/js\/services\/resource.js",
               "plugin\/js\/services\/sendMessageService.js",
               "plugin\/js\/services\/toolbar.js"
            ],
            "Domain":null,
            "Name":"artemis-plugin"
         },
         "activemq-branding":{
            "Context":"\/activemq-branding",
            "Scripts":[
               "plugin\/js\/brandingPlugin.js"
            ],
            "Domain":null,
            "Name":"activemq-branding"
         }
      }
      

      I think there is some script that reads this json and issues the resource requests but it does not seem to take into account the context i put in the bootstrap.xml.

              dbruscin Domenico Francesco Bruscino
              dbruscin Domenico Francesco Bruscino
              Michal Toth Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: