而要連線自war檔時,會為http://127.0.0.1:8080/ xxxx。
若要使用JBoss Context Root為直接徑路時,僅需做下列設定
To replace this page set "enable-welcome-root" to false in your server configuration and deploy your own war with / as its context path.
於standalone.xml找到下述設定位置
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
將enable-welcome-root改為false即可
2.
於WEB-INF底下新增jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.jboss.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
<context-root>/</context-root>
</jboss-web>
沒有留言:
張貼留言