Installation

Pow2ACL archive

Unpack the pow2 ACL archive and put the pow2ACL directory somewhere on your filesystem. We will refer to the full path of the pow2ACL directory using the $POW2ACL_HOME keyword.

Database creation

Create the example ACL database:

  • go into the $POW2ACL_HOME/var/db directory
  • select the subdirectory for the target rdbms and use the *.sql files to build the database structure and fill it with the example data:

    file name description
    acl.ddl.sql contains the data definition language used to build the database tables
    acl.data.sql contains the sql insert statements used to populate the database tables
Use your db client to setup the ACL database and fill it with example data.

Package configuration

Edit the $POW2ACL_HOME/configuration.properties file and set the appriopriate values for the properties keys, as indicated below:

property name description
jdbc_cp_class jdbc connection provider class
jdbc_cp_url jdbc connection provider url
jdbc_driver full qualified class name of your jdbc driver
jdbc_url jdbc driver's url
jdbc_username database user name
jdbc_password database password
velocity_cache boolean value - set it to true to use the Velocity cache; false otherwise
velocity_cache_modificationCheckInterval number of seconds used by the Velocity cache system to check for updates
user_data_provider user data provider. Set it to 'rdbms'
log4j_config boolean value - set it to true to use the cache; false otherwise
log4j_logfile the full path of the log file
loglevel_pow2toolkit log4j log level for pow2toolkit package
loglevel_dbforms log4j log level for dbforms package (jdbforms.sourceforge.net)
webapp_url URL of the web application that lives inside the servlet container. This property will be used by Cactus framework to execute the application integration tests inside the servlet container.

Configuration example:

	# [JDBC stuff]
	# ===========================================================================
	#

	# set the ConnectionProvider class and URL
	jdbc_cp_class  = com.pow2.dao.JakartaConnectionProvider
	jdbc_cp_url    =

	#jdbc_cp_class  = com.pow2.dao.ProtomatterConnectionProvider
	#jdbc_cp_url    = jdbc:protomatter:pool:postgresPool

	#jdbc_cp_class  = com.pow2.dao.SimpleConnectionProvider
	#jdbc_cp_url    =


	# set the JDBC driver properties values;
	jdbc_driver   = org.postgresql.Driver
	jdbc_url      = jdbc:postgresql://myHost/acl2?charSet=ISO-8859-1
	jdbc_username = postgres
	jdbc_password =




	# [Velocity stuff]
	# ===========================================================================
	#
	velocity_cache                           = true
	velocity_cache_modificationCheckInterval = 600




	# [Pow2Toolkit User data provider]
	# ===========================================================================
	#
	# set the default provider for User data and authentication method.
	#
	# Valid user data provider values are:
	#
	# rdbms - to retrieve the user data from the application rdbms.
	# ldap  - to retrieve the user data from a specified LDAP server.
	#         See the [Pow2Toolkit LDAP support] section.

	user_data_provider = rdbms
	#user_data_provider = ldap




	# [Pow2Toolkit Log stuff]
	# ===========================================================================
	#
	# log4j_config  sets the path of the log4j configuration file;
	# log4j_logfile sets the absolute file path of the application log file.

	log4j_config  = /WEB-INF/Pow2Toolkit.properties
	log4j_logfile = G:/code/projects/pow2acl/web/WEB-INF/log/acl.log


	# [log levels]
	#
	# sets the log4j log levels for the application libraries;
	# log4j levels are:
	#
	# debug > info > warn > error

	loglevel_pow2toolkit = debug
	loglevel_dbforms     = warn




	# [Cactus stuff]
	# ===========================================================================
	#
	# set the acl web application url
	# http:// + {hostname:port} + '/' + {webapp_context}

	webapp_url = http://localhost:8080/acl
	
	  

Build process

Open a shell (cmd.exe on Windows), and follow these steps:

  • cd $POW2ACL_HOME/ant
  • ant all
Ant will configure the application and compile the classes. Else, on a win32 platform, you could use the .bat scripts stored into the $POW2ACL_HOME/ant/bin directory.

The following table shows the Ant tasks used by the installation procedure:

task name description
compile compiles the java classes, builds the jar file and moves it into the lib directory of the ACL data management web application
taglib-docs builds the pow2ACL tag library documentation
javadoc builds the pow2ACL javadoc documentation
test executes the Cactus test suite on a live container (the container must be up and running!)
all executes all the installation tasks (except for test )

Web context configuration

Pow2ACL provides a web application as the frontend to the access control list data (currently stored into a relational database). To use the web interface to manage the underlying database, you should add a new web application context to the configuration of your servlet container.



Tomcat 3.x example:

edit the $TOMCAT_HOME/conf/server.xml configuration file, and add a new application context as follow:

  <Context path="/acl" 
           docBase="$POW2ACL_HOME/web"
           crossContext="true"
           debug="0" 
           reloadable="false" 
           trusted="false">
  </Context>
	  



Tomcat 4.x example:

read the Tomcat 4.0 manager howto or the Tomcat 4.1 manager howto guide and follow the instructions to deploy the web applicationw whose war value is file:/$POW2ACL_HOME/web

OR

  • cd into the $POW2ACL_HOME/ant directory
  • copy the lib/catalina-ant.jar into $ANT_HOME/lib directory
  • rename the _tomcat4.properties file as tomcat4.properties and edit it. Example:
      # tomcat4.x application manager URL
      url = http://localhost:8080/manager
    
      # absolute path to the web application directory
      web.src = G:/code/projects/pow2/pow2acl/web
    
      # web application context relative URL
      context = /acl
    
      # login credentials for the tomcat4.x user with the "administrator" role
      username = admin
      password = admin
            
  • executes the following ant command from the shell:

    ant -buildfile tomcat4.xml -Dbasedir=./ install

    or use the $POW2ACL_HOME/ant/bin/tomcat4-install.bat script (win32)

Connection to the Pow2ACL web application

Start your servlet container, and connect to the /acl context with a web browser using the following URL:

  http://localhost:8080/acl