-
1. Re: Enabling directory listings on JBoss AS 7
nickarls Aug 28, 2012 11:51 AM (in response to sfish)1 of 1 people found this helpfulNot sure but the jboss-as-web_1_2.xsd speaks of
<xs:complexType name="static-resourcesType">
<xs:attribute name="listings" default="false" type="xs:boolean" />
check out the xsd for details
-
2. Re: Enabling directory listings on JBoss AS 7
jaysensharma Aug 28, 2012 1:36 PM (in response to sfish)Hi Lukas,
Try running the following CLI command to enable diectory listing:
In Domain Mode
/profile=full/subsystem=web/configuration=static-resources/:write-attribute(name=listings,value=true)
In Standalone Mode
/subsystem=web/configuration=static-resources/:write-attribute(name=listings,value=true)
It will generate following kind of configuration :
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<configuration>
<static-resources listings="true"/>
</configuration>
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
-
3. Re: Enabling directory listings on JBoss AS 7
nickarls Aug 28, 2012 1:39 PM (in response to sfish)And next time, do yourself a favor and don't promise your customer tight deadlines when there are many unknown factors (new tech etc) ;-)
-
4. Re: Enabling directory listings on JBoss AS 7
sfish Aug 29, 2012 4:47 PM (in response to jaysensharma)Thank you, it worked as you explained! However, I still can't get the actual listing to work, and this time I suspect it has something to do with Spring being involved in mapping to static resources. Anyway, if you want, you could give a hint on best practices regarding serving static non-common (i.e. app specific) content and how to make it available through directory listings.
Currently I use Spring's:
<mvc:resources mapping="/res/**" location="/public-resources/" />
Mybe that's not the way to go?
By the way, while I'm personally not in critical need of this explanation anymore, it might be useful for somebody someday.
-
5. Re: Enabling directory listings on JBoss AS 7
sfish Aug 29, 2012 4:49 PM (in response to nickarls)Thank you for your answer!
I know what you mean regarding the deadline ("been there, done that", so to say), but this time it's a course... and the teacher sets the deadlines!