Developer Help


Controlling Java Web Manager File Location

Overview

The locations of certain files and folders inside the Java Web Manager are configurable via the '/WEB-INF/swm.properties' file.  Currently, the location of the following folders and features can be changed:

To modify the location of these folders, make sure that the Java Web Manger is unpacked from the war and working properly.  Stop the servlet container (like Tomcat for example), then proceed.  Once the following changes are made, restart the servlet container.

Currently, all paths are relative either to the Java Web Manager root, or to some other directory which resides in the Java Web Manager root.


Data Folder
  1. Copy the 'data' folder to the desired location.

  2. Edit the '/WEB-INF/swm.properties' file to modify every instance of the string './data' to use the new file location. For example, the following lines may change from :

app.vm.folder.path=./data/vm

app.devices.folder.path=./data/devices

app.sessions.folder.path=./data/sessions

 

to read in Windows :

app.vm.folder.path=C:/WebManagerData/vm

app.devices.folder.path=C:/WebManagerData/devices

app.sessions.folder.path=C:/WebManagerData/sessions

 

or in UNIX :

app.vm.folder.path=/WebManagerData/vm

app.devices.folder.path=/WebManagerData/devices

app.sessions.folder.path=/WebManagerData/sessions

 

NOTE  In this properties file, Windows paths should always use forward slashes '/' instead of back slashes '\'.


Files Folder
  1. Copy the 'files' folder to the desired location.

  2. Edit the '/WEB-INF/swm.properties' file to modify the 'app.files.folder.path' property.  For example, the following line may change from:

app.files.folder.path=./files

 

to read in Windows:

app.files.folder.path=Z:/myFiles

 

where 'Z:' is a mapped drive.

or in UNIX:

app.files.folder.path=/someMountPoint/myFiles

 

  1. Also modify the 'sw2hcm.objecttag.docbase.url=' property.  For example the following line may change from:

sw2hcm.objecttag.docbase.url=./files

 

to read:

sw2hcm.objecttag.docbase.url=http://www.myWebServer.com/swm/files

 

where ./files is replaced with a fully qualified URL that points to the location of the 'files' folder.

or

sw2hcm.objecttag.docbase.url=./BlueZoneFiles

 

where ./files is replaced with a relative path name that exists within the realm of your web server.

CAUTION  It is critical that the location that you choose for this setting is either a fully qualified URL or location that is accessible by your web server.


Logs Folder
  1. Modify the '/WEB-INF/swm.properties' file's 'log.file.path.admin' and 'log.file.path.hosts' properties.  For example, the following lines might change from:

log.file.path.admin=./admin/admin.log

log.file.path.hosts=./user/user.log

 

to read in Windows:

log.file.path.admin=C:/Tomcat5/logs/WebManager/admin.log

log.file.path.hosts=C:/Tomcat5/logs/WebManager/user.log

 

or in UNIX:

log.file.path.admin=/Tomcat5/logs/WebManager/admin.log

log.file.path.hosts=/Tomcat5/logs/WebManager/user.log

 


External URL Support

It is possible to configure the Java Web Manager to use a given URL as the path to BlueZone files from within the Object Tag which launches user sessions.  This is also controlled via the '/WEB-INF/swm.properties' file.

By default, the property which controls this functionality reads:

sw2hcm.objecttag.docbase.url=./files

 

The Java Web Manager interprets from this that the location of these files are relative to the root, and so it builds the path in the Object Tag from the URL that is used to access the launch screen.  To direct the Java Web Manager to use a specific URL, simply change the line to read something like:

sw2hcm.objecttag.docbase.url=http://my.other.server/somefiles/

 

This new line will appear in the Object Tag when End Users launch their sessions.

NOTE  When pointing to an external URL as directed above, it is the Java Web Manager Administrator's responsibility to ensure that the Java Web Manager's files are synchronized to the external file repository.  This may not be necessary if the external repository is network accessible, in which case it may be possible to simply change 'files' directory location as described above.