I'm trying to deploy a second web application to a Wildfly server currently hosting a single application. I've made the following modifications to standalone.xml (see Accessing Multiple web applications on Jboss7 or Wildfly - my need is essentially the same):
Under <subsystem xlmns="urn:jboss:domain:undertow:8.0>, added
<server name="dispatch-server">
<http-listener name="default" socket-binding="dispatch"/>
<host name="dispatch-host" default-web-module="Dispatch.war" alias="Dispatch.com">
</host>
</server>
Next, under <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">, added
<socket-binding name="dispatch" port="${jboss.https.port:8081}"/>
Finally, under <Deployments>, added
<deployment name="Dispatch.war" runtime-name="Dispatch.war">
<fs-archive path="${jboss.home.dir}/standalone/deployments/Dispatch.war" />
</deployment>
web.xml content for the deployed Dispatch.war:
<servlet>
<servlet-name>DispatchServlet</servlet-name>
<servlet-class>blah.blah.blah.DispatchServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DispatchServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
I wrote a little application to test connecting to the servlet, using "http://localhost:8081", but I get an HTTP 404 error. I've tried additionally with "http://localhost:8081/DispatchServlet" with no changes.
I found other tutorials mentioning the need for a jboss-web.xml file bundled with Dispatch.war, so I added a barebones one that looks like:
<jboss-web>
<context-root>/</context-root>
</jboss-web>
It didn't impact the behavior I was seeing. I also tried changing the context-root to "DispatchServlet" and then hitting "http://localhost:8081/DispatchServlet" with nothing.
Is there something obvious I'm goofing on?