Example: Configuration for classpath-based loading (Java)

Example: Configuration for classpath-based loading (Java)

 

The following is an example of the application.properties file, configuring Oracle Web Determinations to load everything from the classpath.

The following assumes that the resources are placed into folders called configuration, images, resources, rulebases and templates under the WEB-INF/classes folder in the web application's deployment folder.

Note:

This works for both an exploded and unexploded WAR deployment.

#########################################
# Core application properties, these are used to configure the application and are not available to
# screens.
#########################################
# The locale to default to if we're displaying a screen that is not attached to a specific locale.

default.locale =en-US

# Set enable.debugger to true if you need to be able to debug from Oracle Policy Modeling
enable.debugger =true

#########################################
# Rulebase Loading Properties
# If rulebases are to be loaded as resource streams, this
# property specified whether or not the Java classpath
# is to be used to load the resources.

load.rulebase.from.classpath =true

rulebase.path =/WEB-INF/classes/rulebases
cache.loaded.rulebases =false
enable.second.person =true

# Screens file content can include html authored by users in oracle policy modelling as static content.
# These options determine whether to scan the content at application start time and verify that the
# tags deployed in the rulebase are in the whitelist of allowable content.

screens.validate.html =true

# any tag not on this list will cause an exception to be thrown during rulebase loading and the rulebase
# will not be available.
# if additional tags are required they must be added to this list.

screens.html.tags.whitelist
   =b;i;del;s;div;p;span;pre;table;td;tr;ol;ul;li;blockquote;font;a;h1;h2;h3;h4;h5;h6;img;hr;br;u

#########################################
# Resourcing Properties
load.messages.as.resource =true
messages.path =configuration
cache.messages =false

load.images.as.resource =true
images.path =images
cache.images =false

load.resource.as.resource =true
resources.path =resources
cache.resources =false

load.properties.as.resource =true
properties.path =configuration
cache.properties =false

load.templates.as.resource =true
templates.path =templates
cache.templates =false

load.static.content.as.resource =false
static.content.path =content

#########################################
# Plugins Properties
# This is a java only property used for web application servers where class path introspection is not
# possible such as WebLogic when the war file is not exploded. In that case, this property contains the ';'
# list of fully qualified plugin classes to load and the plugin libraries must reside in a directory that will
# automatically loaded on the classpath

plugin.libraries=

# Default XDS data adaptor file path
xds.file.path=data

#########################################
# MIME type mappings for resource extensions
extension.xml =text/xml
extension.htm =text/html
extension.html =text/html
extension.css =text/css
extension.js =text/javascript
extension.txt =text/plain

extension.gif =image/gif
extension.jpeg =image/jpeg
extension.jpg =image/jpeg
extension.png =image/png
extension.svg =image/svg+xml
extension.tiff =image/tiff
extension.ico =image/vnd.microsoft.icon

extension.pdf =application/pdf
extension.zip =application/zip

See also:

application.properties file

Example: Configuration for file system-based loading (Java and .NET)