Sheila's Blog

Software Development

Sheila's Blog header image 5

Entries from March 10th, 2009

Serving static external content in JBoss

March 10th, 2009 No Comments

To serve external static content in JBoss you need to add a Context element mapping the url eg. /application/test_data to the external folder as follows:
Edit /server/default/deploy/jbossweb-tomcat50.sar/server.xml and add a Context element just under the host tag.
<host name=”localhost”
autoDeploy=”false” deployOnStartup=”false” deployXML=”false”
configClass=”org.jboss.web.tomcat.security.config.JBossContextConfig”>

<Context path=”/app/test_data” appBase=”"
docBase=”C:/test_data”
debug=”99″ reloadable=”true”>
</Context>
Replace C:/test_data with the path to the folder on the server.
Redeploy the application to [...]

Tags: