2017-07-05 1 views
0

Meine Anwendung läuft gut mit dieser URL: http://localhost:8291/projectName/index.html.Wie Projektname in URL in Jboss entfernen?

Aber ich möchte mein Projekt mit http://localhost:8291 ausführen.

Ich habe versucht, folgende Konfigurationsänderungen in standalone.xml Datei in jboss-as-7.1.1.Final\standalone\configuration\standalone.xml

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false"> 
     <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> 
     <virtual-server name="default-host" enable-welcome-root="false"> 
      <alias name="localhost"/> 
      <alias name="example.com"/> 
     </virtual-server> 
    </subsystem> 

Aber es funktioniert nicht.

Antwort

0

Nicht wirklich sicher, ob Sie die Lösung gefunden haben oder nicht, aber folgende könnte Ihr Problem lösen. Ich gehe davon aus, dass Sie eine WAR-Datei bereitstellen. In Ihrem Web Application Ordner wie in Screenshot erstellen Jboss-web.xml und fügen Sie folgenden Inhalt:

<?xml version="1.0" encoding="UTF-8"?> 
<jboss-web> 
    <context-root>/</context-root> 
</jboss-web> 

enter image description here