The WebLogic virtual directory mapping allows an application to serve files such as images or
static files that are located outside the document root of the application.
You can use the WebSphere file-serving features to serve these files.
This rule detects the presence of the <virtual-directory-mapping> element in the
weblogic.xml file. The automated fix will be able to help you create
corresponding <fileServingAttributes> elements in the WebSphere traditional or Liberty
web extension file.
For example, the weblogic.xml file can contain the following mappings:
You can define the same information in the WebSphere Application Server web extensions as shown in the following example:
The extendedDocumentRoot file serving attribute is a comma-delimited string for more than one root that exists outside
of the application web module.
The file.serving.patterns.allow file serving attribute is a space-delimited string for more than one pattern.
You might experience problems serving content from applications
with static content in multiple locations.
In WebLogic any defined virtual-directory-mapping is
available from both the context root and the directory location.
In WebSphere Application Server the file.serving.patterns.allow property
limits access to static contents that match the specified patterns within the
extended document root or the context root.
Depending on how your files are organized, you might need to
modify the file.serving.patterns.allow property value. For example,
If you have an
images directory in /common/files and a /common/files/images
in the context root, add a /common/files/images to the file.serving.patterns.allow property value.
You can allow wider access to files using the setting in the following example, but using this setting might allow more content to be available to the application than you intend.
For more information and examples, see the following resources: