0

Can I create a static directory in JBoss AS 7.2, like WildFly?

I know the WildFly server can be configured to serve static content by undertow subsystem. For instance:

<server name="default-server">
    <http-listener name="default" socket-binding="http"/>
    <host name="default-host" alias="localhost">
        <location name="/mycontent" handler="content"/>
    </host>
</server>
<handlers>
    <file name="content" path="${jboss.home.dir}/content" directory-listing="true"/>
</handlers>

According to my requirement, user will upload the static content in the static directory.

MFH
  • 357
  • 3
  • 17

1 Answers1

0

I have found the solution.

JBoss AS 7.2 does not support to serve static content's directory as WildFly. I know, not everybody has luxury to use WildFly.

I created a war directory with extension (mycontent.war) instead of war file and created dodeployed.war file also. Inside the mycontent.war directory, I created WEB-INF directory and web.xml file. The web.xml file contains only display name tag. That is it. You can upload the static content in the directory and the contents can be served also.

MFH
  • 357
  • 3
  • 17