Reputation: 119
I have an application deployed on JBoss Eap 6.4 and I need to access to images that are located outside of my project in C:\AdminCont\Images, Is there any form to configure for JSP access to this images or any other form using NFS?
I´m trying using overlay in jboss-web.xml but I don´t know how is the correct implementation.
Upvotes: 1
Views: 524
Reputation: 986
A portable way to implement this is to write a small servlet which simply maps the request URL to a filesystem location and sends the content out.
A not portable way, a JBoss specific way, is to declare an outside directory to <overlay>
in jboss-web.xml
in order to add non-existing files to your deployment. Here is an example:
<jboss-web version="7.0"
xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee jboss-web_7_0.xsd">
...
<overlay>/path/to/your/images/</overlay>
...
</jboss-web>
Upvotes: 2