在JBoss AS 7中将项目指定至'/'根目录
1.创建WEB-INF/jboss-web.xml文件,全部内容如下:
<?xml version="1.0" encoding="UTF-8"?><jboss-web> <context-root>/</context-root></jboss-web>
<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host"> <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost" /> <alias name="example.com" /> </virtual-server></subsystem>