Reputation: 245
I am using Websphere Server v8.0. What property should I set to add a new webapp context similar to Glassfish property
<property name="alternatedocroot_1" value="from=/images/* dir=/var/webapp" />
for Websphere ? My requirement is I need to access files outside webapp in my JSF page.
Upvotes: 0
Views: 319
Reputation: 18050
You are probably asking about the extendedDocumentRoot
property:
Use the extended document root facility when applications require access to files outside of the application web application archive (WAR) directory. This facility enables you to configure an application with one or more directory paths from which you can serve static files and JSP files. You can use this attribute when an application requires access to files that exist outside of the web application archive (WAR) directory.
To configure it, create ibm-web-ext.xml
file, if you already dont have one, and specify following property:
<fileServingAttributes xmi:id="FileServingAttribute_1" name="extendedDocumentRoot" value="/opt/extDocRootDir"/>
For more details and samples check this page - JSP engine configuration parameters.
Separate parameter is used to serve JSPs from external folder.
Upvotes: 2