File serving
In file serving, web applications can serve static file types, such as HTML. File-serving attributes are used by the servlet that implements file-serving behavior.
The file-serving behavior is implemented by setting the fileservingenabled property to true when configuring the web module.
Example attributes:
- bufferSize
- Sets buffer size that is used for serving static files.
- extendedDocumentRoot
- Enables you to configure an application with one or more directory paths from which you can
serve static files and Java ServerPages (JSP) files. You can use this attribute when an application
requires access to files that exist outside of the application web application archive (WAR)
directory. For example, if several applications require access to a set of common files, you can
place the common files in a directory to which you can link each application as an extended document
root directory.
Use this attribute in addition to the contextRoot attribute.
You can also use this attribute to define a WebSphere variable on multiple nodes to the appropriate directory.
Example:<fileServingEnabled="true">
where MY_CUSTOM_VARIABLE is the WebSphere variable that you want to define on multiple nodes.<fileServingAttributes xmi:id="FileServingAttribute_1" name="extendedDocumentRoot" value="${MY_CUSTOM_VARIABLE}"/>
For more information, see JSP engine configuration parameters.
- file.serving.patterns.allow
- Specifies that only files matching the specified pattern are served.
- file.serving.patterns.deny
- Specifies that files that match the specified file pattern are denied