Add another file handler and another location to the undertow subsystem in standalone.xml:
<server name="default-server">
<http-listener name="default" socket-binding="http"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<location name="/img" handler="images"/>
</host>
</server>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
<file name="images" path="/var/images" directory-listing="true"/>
</handlers>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…