Portlet Factory, Version 6.1.2
Getting system properties
You can get the values of IBM® WebSphere Portlet Factory properties stored in the cluster.properties and bowstreet.properties files.
Access the com.bowstreet.util.SystemProperties object returned by a call to webAppAccess.getSystemProperties(). Using the SystemProperties object, you can access information such as the directory path to the document root, the URL to the server, and other information. Call the following methods:
- Directory path to document root
- webAppAccess.getSystemProperties().getDocumentRoot();Returns a string that specifies the directory path to WebSphere Portlet Factory servable content root directory. For example:
AppServerDeployDir\MyApp.ear\MyApp.war- Directory path to WebSphere Portlet Factory WEB-INF directory
- webAppAccess.getSystemProperties().getWebInfDir();Returns a string that specifies the directory path to WebSphere Portlet Factory non-servable content root directory. For example:
AppServerDeployDir\MyApp.ear\MyApp.war\WEB-INF- URL to WebSphere Portlet Factory server
- webAppAccess.getRequestData().getContextURL();Returns a string that specifies the URL to WebSphere Portlet Factory. For example:
http://127.0.0.1:9080/MyApp- URL to WebSphere Portlet Factory servlet
- webAppAccess.getRequestData().getServletURL(); Returns a string that specifies the URL to the current WebSphere Portlet Factory servlet. For example:
http://127.0.0.1:9080/MyApp/webengine
Parent topic: Getting and setting variable values Parent topic: Overview: working with Java
- Accessing other properties
You can access values stored in other properties files using Java conventions for loading properties files.
- WebSphere Portlet Factory API documentation
Library | Support |