Installation Instructions
Configure the webapp
- Download OpsTimeSheetHttpClient.war.
- Open it with a archive manager(winzip/ark)
- Open the web.xml file in the WEB-INF directory with your favorite editor.
- At the part:
<web-app>
<servlet>
<servlet-name>TimesheetServlet</servlet-name>
<servlet-class>nl.func.ops.servlets.TimesheetHttpServlet</servlet-class>
<init-param>
<param-name>opsUrl</param-name>
<param-value>http://localhost:8080/ops_project/services/OpsProject</param-value>
</init-param>
</servlet>
...
<security-constraint>
<web-resource-collection>
<web-resource-name>*</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<!-- Change this to the group you want your users to be part of -->
<role-name>OpsProject</role-name>
</auth-constraint>
</security-constraint>
<web-app>
Install the webapp
To install the webapp you have to make some modifications to your tomcat configuration. In this example tomcat (5.0) is installed on a windows machine in C:\Tomcat. We are going to install the webapp in the default webapp directory. Change the paths for your particular situation.
Deploy the webapp
- Copy the OpsTimeSheetHttpClient.war to webapps directory in tomcat(eg c:\Tomcat\webapps). Make sure that tomcat is running so it will be unpacked for you.
Configure Tomcat
There are two ways to configure tomcat. The first is to edit your server.xml and the second(the new way) is to add a file to Catalina/
/
- Option 1: Editing server.xml
- In conf/server.xml define a new context with aLDAP Realm for authentication(see snippet below)
- Option 2: Adding a new file to Catalina//
- Create a file in Catalina// (default is localhost) name ops_timesheet.xml for example
- Add the following to the file adding your info:
<Context path="/ts" reloadable="true" docBase="/home/bastiaan/webservices/OpsTimeSheetHttpClient.war" >
<Realm className="org.apache.catalina.realm.JNDIRealm"
debug="4"
connectionURL="ldaps://ldapserver.yourcompany.com"
secure="true"
connectionName="uid=auth,ou=Users,<your company's base dn>"
connectionPassword="apassword"
userPattern="uid={0},ou=Users,<your company's base dn>"
roleBase="ou=Groups,<your company's base dn>"
roleName="cn"
roleSearch="(memberUid={1})"/>
<Logger className="org.apache.catalina.logger.SystemOutLogger" verbosity="4" timestamp="true"/>
</Context>
connectionName and password must be set to a user with read priveleges on the Groups ou
- NOTE: if you're installing this on a *nix machine be sure to set the owner of the config file and the war to the tomcat user/group.
- restart Tomcat
Testing
- Start Tomcat
- fire up a browser and type in the address bar http://yourserver.com:8080/ts/
- Fill in your username and password
- If a page is returned to you saying "I expected some parameters..." the OpsTimeSheetHttpClient is working and can reach ldap.
- Type in the following in your address bar http://yourserver.com:8080/ts/?method=report. If an empty page is returned(You didn't have any timesheets did you) all is well and the OPS server can be reached. If the server can't be reached an error is displayed.
-- IvoVanDongen - 14 Oct 2005
Topic revision: r4 - 15 Jan 2009 - 15:38:56 -
IvanaCace