How to service JSPs or static resources outside the WAR/EAR in JBoss EAP 6/7

Solution Verified - Updated -


  • There is an application that runs in EAP 4 and have the following configuration in jboss-web.deployer/server.xml. For example:
<Context path="/myapp/doc" appBase=""
<Context path="/myapp/pdf" appBase=""
  • I see there is no option in web subsystem to map those directories as web resources. Those directories cannot be packaged in the application .war file, because the contents are produced by other application and just copied to "pdf" or "doc" directory. Also, they cannot be served from Apache WebServer, as there is some custom code from our .war file that loads or produces files in "doc" or "pdf" directories. So, how those directories can be mapped as static resources similarly as they are in EAP 4 ?
  • I saw some valve examples in jboss-web.xml but could not find similar conf for static resources. I see tomcat has this feature, but jbossweb restricts its usage.
  • Include external file location in web context? How to configure External context in server.xml on JBoss EAP6 ?
  • Migrating apps from WebSphere to EAP6, we need to replicate websphere's ability to mount external file locations into an application's web context.
  • Is there any methodology to make a static and dynamic files outside the EAR/WAR like extended document root functionality of WAS?
  • We need to display the information online in a folder that is not in JBoss ?


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In