+

Search Tips   |   Advanced Search

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 used for serving static files.

extendedDocumentRoot

Enable you to configure an application with one or more directory paths from which we can serve static files and JSP files. 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, we can place the common files in a directory to which we can link each application as an extended document root directory.

Use this attribute in addition to the contextRoot attribute.

We can also use this attribute to define a WebSphere variable on multiple nodes to the appropriate directory.

Example:

<fileServingEnabled="true">
<fileServingAttributes xmi:id="FileServingAttribute_1" name="extendedDocumentRoot"
  	value="${MY_CUSTOM_VARIABLE}"/>
where MY_CUSTOM_VARIABLE is the WebSphere variable to define on multiple nodes.

See JSP engine configuration parameters.

file.serving.patterns.allow

That only files matching the specified pattern are served.

file.serving.patterns.deny

That files that match the specified file pattern are denied

  • Web applications: Resources for learning
  • Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands
  • JSP engine configuration parameters