JBoss eap 6.4 cli name deployment

1.4k views Asked by At

I am attempting to deploy a war file in Jboss eap 6.4 and I want to use the --name argument with the deploy. However, when I do so the war gets deployed but is inaccessible via the name..

The war file is named testweb.war. It works perfectly fine when I deploy it without the --name argument during the deploy command, but I am creating a deploy script where customers need to be able to name the application as well...

Here is the web.xml in my war file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
    "http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd">
<jboss-web>
     <context-root></context-root>
</jboss-web>

The command I'm using with the jboss-cli is:

deploy /path/to/war/testweb.war --name=testweb

And the web application is inaccessible via the url:

localhost:8085/testweb

This is the correct port number, and should be the correct application name..

Thank you in advance.

1

There are 1 answers

0
Backwardsman On BEST ANSWER

Well, I figured it out today in case anyone out there was also asking this very obscure question haha..

The issue is with the runtime-name of the deployed war. In Jboss the runtime name must end with the extension of the file being deployed.. So if you deploy example.war the runtime name must end with .war

When you specify a name without specifying the runtime name you get a problem, because by default jboss will use the application name as the runtime name.

So when I did: deploy /path/to/war/testweb.war --name=testweb It was subsequently using testweb as the runtime name, and therefore wouldn't work properly.

/path/to/war/testweb.war --name=testweb --runtime-name=testweb.war is a way to fix this issue.