Default deployment of OpenSSO8 War file on WS 7.0U3 is to the "/" directory - How to get around this
By Gregory Bedigian on Nov 24, 2008
Upon trying to deploy the opensso.war file for OpenSSO8 onto Java Sun WebServer 7.0u3, I found that the default deployment was to the "/" directory. Basically I was following along with the instructions for deployment found here:
The only possible recourse would be to unjar the jar file, modify the configuration and rejar it.
Once you unjar this, set the configuration.dir to be a directory which is within the scope of the root of the webserver (in my case that is /opt/nes7) and make sure that this directory is owned and grouped by the owner of the webserver process (in my case, and for most, that is webservd)
Below, you can see that I unjarred the opensso.jar
# cd /opt/installs/opensso8/opensso/deployable-war
# cp opensso.war opensso.war.orig
# mkdir unjar
# cp opensso.war unjar
# cd unjar
# jar xvf opensso.war <- which now creates a whole subset of unjarred directories....)
# tail -f bootstrap.properties
# This property should be used for application servers like
# JBoss where the ServletContext.getRealPath() method does
# not always return the same value after the server is restarted.
# This property should also be used when the system user that
# is running the web/application server process does not have
# a home directory. i.e. System.getProperty("user.home") returns
configuration.dir=/opt/nes7/sso8 <- put a value in here....
Now just rejar the thing and deploy using this modified jar file.
Aditionally - Make sure that the webservd user has a home directory specified that is owned and grouped by that user! Mine originally looked like this:
webservd:x:80:80:WebServer Reserved UID:/:
So if yours looks like that - then change the home directory to be the webserver installation root similar to as you see here:
webservd:x:80:80:WebServer Reserved UID:/opt/nes7:
Remember to restart both the webserver administrative server AND the server instance before now doing the deploy!