Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Aperi/sso"

(New page: You need the following: 1. Eclipse J2EE IDE 2. Open LDAP 3. Tomcat 5.5 4. Java 1.5 Eclipse From http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganyme...)
 
(Download Client Code)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
You need the following:
+
== You need the following prerequisites: ==
1. Eclipse J2EE IDE
+
1. Eclipse J2EE IDE<br/>
2. Open LDAP
+
2. Open LDAP<br/>
3. Tomcat 5.5
+
3. Tomcat 5.5<br/>
4. Java 1.5
+
4. Java 1.5 (make sure you already have this installed)<br/>
  
Eclipse
+
 
 +
== Eclipse ==
 
From http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/R/eclipse-jee-ganymede-win32.zip  
 
From http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/R/eclipse-jee-ganymede-win32.zip  
 
download eclipse-jee-ganymede-win32.zip.  Unzip the file into C:\Dev so that the following tree is created - C:\Dev\Tools\eclipse-jee-ganymede-win32\eclipse\eclipse.exe.   
 
download eclipse-jee-ganymede-win32.zip.  Unzip the file into C:\Dev so that the following tree is created - C:\Dev\Tools\eclipse-jee-ganymede-win32\eclipse\eclipse.exe.   
 
 
Eclipse is now installed.
 
Eclipse is now installed.
  
  
Tomcat
+
== Tomcat ==
 
From http://tomcat.apache.org/download-55.cgi, download apache-tomcat-5.5.26.zip.  Unzip the file such that you have the following directory tree - C:\Dev\Tools\apache-tomcat-5.5.26\bin.   
 
From http://tomcat.apache.org/download-55.cgi, download apache-tomcat-5.5.26.zip.  Unzip the file such that you have the following directory tree - C:\Dev\Tools\apache-tomcat-5.5.26\bin.   
 
 
Apache is now installed.
 
Apache is now installed.
  
  
 +
== Open LDAP ==
 +
From https://camelot.parityinc.net/STSDocs/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe download the .exe file.  Install the program by double clicking on it.  Install into the default location (C:\Program Files\OpenLDAP\).  OpenLdap is now installed.  We will configure later. 
 +
 +
 +
== Configure Eclipse ==
 +
 +
Open Eclipse by clicking on C:\Dev\Tools\eclipse-jee-ganymede-win32\eclipse\eclipse.exe.  Choose c:\Dev\Code\STSServer as your workspace.
 +
 +
Configure Tomcat in Eclipse:<br/>
 +
Go to Window --> Preferences<br/>
 +
Click on ‘Server’ Tree, then click on ‘Runtime Environments’<br/>
 +
Click ‘Add’, then select Apache Tomcat v5.5 <br/>
 +
Click ‘Create a new local server’ <br/>
 +
Click ‘Next’<br/>
 +
Click ‘Browse’ and select C:\Dev\Tools\apache-tomcat-5.5.26<br/>
 +
Click ‘Finish’  <br/>
 +
 +
Make sure the java runtime is pointed towards your Java 1.5 installation.  Go to Window --> Preferences.  Click on 'Java' --> 'Installed JREs'.  Make sure the java runtime (on the right hand side) corresponds with your Java 1.5 installation.  If not, add and select it. 
 +
 +
==Download STS Server==
 +
Go to http://download.eclipse.org/technology/higgins/downloads/sts.binding.axis1x.service/builds/S-S20080801-200808011007/index.html.
 +
Click on 'war.zip' and download org.eclipse.higgins.sts.binding.axis1x.service-incubation-S20080801-war.zip to a temporary directory like (c:\temp).  Unzip the archive so you can access the war file. <br/>
 +
 +
Download some setup files, but first setup connection with CVS server.  Go to Window --> 'Open Perspective' --> 'Other' --> 'CVS Repository Exploring'.  Right click --> 'New' --> 'Repository Location'.<br/> 
 +
Host: dev.eclipse.org<br/>
 +
Repository path: /cvsroot/technology<br/>
 +
User: anonymous (or your user name)<br/>
 +
Connection type: pserver<br/>
 +
From the cvs server tree, drill down thru org.eclipse.aperi, thru STSServer, right click 'SetupFiles' --> 'Check Out'<br/>
 +
Go back to J2EE or Java perspective to get to your workspace. (Window --> Perspective) <br/>
 +
<br/>
 +
 +
From within the eclipse IDE, go to File --> Import --> Team --> Team Project Set <br/>
 +
Choose C:\Dev\Code\STSServer\SetupFiles\stsclient.psf and click 'Finish' <br/>
 +
This will download the client code into your Eclipse workspace. <br/>
 +
 +
== Configuring LDAP ==
 +
Copy the contents of SetupFiles/ldap_windows_config.zip into the C:\Program Files\OpenLDAP directory.  Overwrite any files.  Copy the contents of SetupFiles/ldapData.zip into the C:\Program Files\OpenLDAP\data directory.
 +
 +
== Installing Server WAR ==
 +
File --> Import --> Web --> WAR File.  Click 'Browse' and select C:\temp\org.eclipse.higgins.sts.binding.axis1x.service-incubation-S20080801.war.  Click 'Next'.  Click 'Finish'.  Give Eclipse a moment to validate. 
 +
On the bottom set up tabs, click on the Servers tab.  If it is not there, Window --> Show Views --> Servers.  Right click the Tomcat Server instance shown in the Servers tab. Select 'Add or Remove Objects'.  From the available projects, select org.eclipse.higgins.sts.bindings.axis1x.service and press the 'Add' button.  Click Finish. 
 +
From the Project Explorer view, copy the SetupFiles/server.xml file into the "Servers/Tomcat v5.5 Server at localhost" tree.
 +
 +
== Setup JVM Security ==
 +
Copy the files from SetupFiles/jrelibsecurity (cacerts, local_policy.jar, US_export_policy.jar) to <YOUR JDK DIR>/jre/bin directory.  It is recommended that you make backup copies of the files that are already in that location before copying over them.  Once the files have been copied, from that directory run the following command:<br/>
 +
<b>keytool -import -file root.cer -trustcacerts -storepass changeit -keystore cacerts</b><br/>
 +
This will set your java runtime for the STS server.  (NOTE: this has been tested on the Sun JVM).<br/>
  
Open Eclipse by clicking on C:\Dev\Tools\eclipse-jee-ganymede-win32\eclipse\eclipse.exe.   
+
== Start LDAP ==
 +
Go to your ldap directory (C:\Program Files\OpenLDAP).  Run 'slapd.exe'.  This starts the LDAP server.   
  
Configure Tomcat in Eclipse:
+
== Setup Server Properties & Run It ==
Go to Window --> Perspective
+
Go to Run --> Run Configurations.  On the left pane, right click Apache Tomcat and select 'New'. Change the name of the process to STS Server.  Click the Arguments tab, and add the following to the VM Arguments section:<br/>
Click on ‘Server’ Tree, then click on ‘Runtime Environments’
+
-Dorg.eclipse.higgins.sts.conf="C:/Dev/Code/STSServer/org.eclipse.higgins.sts.binding.axis1x.service/WebContent/ConfigurationFiles" -Dorg.eclipse.higgins.sts.conf.file="ManagedConfiguration.xml"<br/>
Click ‘Add’, then select Apache Tomcat v5.5
+
Click Apply.  <br/>
Click ‘Create a new local server’
+
Click on the Classpath tab.  Click on 'User Entries' and then 'Add External Jars' - select C:\Dev\Tools\apache-tomcat-5.5.26\bin\bootstrap.jar.  Click 'Add External Jars' again.  Select <YOUR_JDK_DIR>/lib/tools.jar.  <br/>
Click ‘Next’
+
Click Apply. Click Run. <br/>
Click ‘Browse’ and select C:\Dev\Tools\apache-tomcat-5.5.26
+
Click ‘Ok’  
+
  
  
 +
== Run Client Code ==
  
-Dcatalina.base="C:\Dev\Code\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="C:\Dev\Tools\apache-tomcat-5.5.26" -Dwtp.deploy="C:\Dev\Code\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" -Djava.endorsed.dirs="C:\Dev\Tools\apache-tomcat-5.5.26\common\endorsed"
+
To run the code:
-Dorg.eclipse.higgins.sts.conf="C:/Dev/Code/org.eclipse.higgins.sts.binding.axis1x.service/WebContent/ConfigurationFiles" -Dorg.eclipse.higgins.sts.conf.file="ManagedConfiguration.xml"
+
<li>Go to Run --> Open Run Dialog --> Click on 'Java Application' --> Click on the 'New' button</li>
 +
<li>In the 'Name' field, type 'Managed Client' </li>
 +
<li>For the 'Main Class' click 'Search' and choose 'org.eclipse.aperi.demo.sso.ManagedClient' </li>
 +
<li>Click the 'Arguments' Tab up top, add ' -Dorg.eclipse.higgins.sts.conf="C:/Dev/Code/STSServer/org.eclipse.aperi.demo.sso/ConfigurationFiles" -Dorg.eclipse.higgins.sts.conf.file="ManagedClientConfiguration.xml" ' to the VM arguments</li>

Latest revision as of 18:00, 26 August 2008

You need the following prerequisites:

1. Eclipse J2EE IDE
2. Open LDAP
3. Tomcat 5.5
4. Java 1.5 (make sure you already have this installed)


Eclipse

From http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/R/eclipse-jee-ganymede-win32.zip download eclipse-jee-ganymede-win32.zip. Unzip the file into C:\Dev so that the following tree is created - C:\Dev\Tools\eclipse-jee-ganymede-win32\eclipse\eclipse.exe. Eclipse is now installed.


Tomcat

From http://tomcat.apache.org/download-55.cgi, download apache-tomcat-5.5.26.zip. Unzip the file such that you have the following directory tree - C:\Dev\Tools\apache-tomcat-5.5.26\bin. Apache is now installed.


Open LDAP

From https://camelot.parityinc.net/STSDocs/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe download the .exe file. Install the program by double clicking on it. Install into the default location (C:\Program Files\OpenLDAP\). OpenLdap is now installed. We will configure later.


Configure Eclipse

Open Eclipse by clicking on C:\Dev\Tools\eclipse-jee-ganymede-win32\eclipse\eclipse.exe. Choose c:\Dev\Code\STSServer as your workspace.

Configure Tomcat in Eclipse:
Go to Window --> Preferences
Click on ‘Server’ Tree, then click on ‘Runtime Environments’
Click ‘Add’, then select Apache Tomcat v5.5
Click ‘Create a new local server’
Click ‘Next’
Click ‘Browse’ and select C:\Dev\Tools\apache-tomcat-5.5.26
Click ‘Finish’

Make sure the java runtime is pointed towards your Java 1.5 installation. Go to Window --> Preferences. Click on 'Java' --> 'Installed JREs'. Make sure the java runtime (on the right hand side) corresponds with your Java 1.5 installation. If not, add and select it.

Download STS Server

Go to http://download.eclipse.org/technology/higgins/downloads/sts.binding.axis1x.service/builds/S-S20080801-200808011007/index.html. Click on 'war.zip' and download org.eclipse.higgins.sts.binding.axis1x.service-incubation-S20080801-war.zip to a temporary directory like (c:\temp). Unzip the archive so you can access the war file.

Download some setup files, but first setup connection with CVS server. Go to Window --> 'Open Perspective' --> 'Other' --> 'CVS Repository Exploring'. Right click --> 'New' --> 'Repository Location'.
Host: dev.eclipse.org
Repository path: /cvsroot/technology
User: anonymous (or your user name)
Connection type: pserver
From the cvs server tree, drill down thru org.eclipse.aperi, thru STSServer, right click 'SetupFiles' --> 'Check Out'
Go back to J2EE or Java perspective to get to your workspace. (Window --> Perspective)

From within the eclipse IDE, go to File --> Import --> Team --> Team Project Set
Choose C:\Dev\Code\STSServer\SetupFiles\stsclient.psf and click 'Finish'
This will download the client code into your Eclipse workspace.

Configuring LDAP

Copy the contents of SetupFiles/ldap_windows_config.zip into the C:\Program Files\OpenLDAP directory. Overwrite any files. Copy the contents of SetupFiles/ldapData.zip into the C:\Program Files\OpenLDAP\data directory.

Installing Server WAR

File --> Import --> Web --> WAR File. Click 'Browse' and select C:\temp\org.eclipse.higgins.sts.binding.axis1x.service-incubation-S20080801.war. Click 'Next'. Click 'Finish'. Give Eclipse a moment to validate. On the bottom set up tabs, click on the Servers tab. If it is not there, Window --> Show Views --> Servers. Right click the Tomcat Server instance shown in the Servers tab. Select 'Add or Remove Objects'. From the available projects, select org.eclipse.higgins.sts.bindings.axis1x.service and press the 'Add' button. Click Finish. From the Project Explorer view, copy the SetupFiles/server.xml file into the "Servers/Tomcat v5.5 Server at localhost" tree.

Setup JVM Security

Copy the files from SetupFiles/jrelibsecurity (cacerts, local_policy.jar, US_export_policy.jar) to <YOUR JDK DIR>/jre/bin directory. It is recommended that you make backup copies of the files that are already in that location before copying over them. Once the files have been copied, from that directory run the following command:
keytool -import -file root.cer -trustcacerts -storepass changeit -keystore cacerts
This will set your java runtime for the STS server. (NOTE: this has been tested on the Sun JVM).

Start LDAP

Go to your ldap directory (C:\Program Files\OpenLDAP). Run 'slapd.exe'. This starts the LDAP server.

Setup Server Properties & Run It

Go to Run --> Run Configurations. On the left pane, right click Apache Tomcat and select 'New'. Change the name of the process to STS Server. Click the Arguments tab, and add the following to the VM Arguments section:
-Dorg.eclipse.higgins.sts.conf="C:/Dev/Code/STSServer/org.eclipse.higgins.sts.binding.axis1x.service/WebContent/ConfigurationFiles" -Dorg.eclipse.higgins.sts.conf.file="ManagedConfiguration.xml"
Click Apply.
Click on the Classpath tab. Click on 'User Entries' and then 'Add External Jars' - select C:\Dev\Tools\apache-tomcat-5.5.26\bin\bootstrap.jar. Click 'Add External Jars' again. Select <YOUR_JDK_DIR>/lib/tools.jar.
Click Apply. Click Run.


Run Client Code

To run the code:

  • Go to Run --> Open Run Dialog --> Click on 'Java Application' --> Click on the 'New' button
  • In the 'Name' field, type 'Managed Client'
  • For the 'Main Class' click 'Search' and choose 'org.eclipse.aperi.demo.sso.ManagedClient'
  • Click the 'Arguments' Tab up top, add ' -Dorg.eclipse.higgins.sts.conf="C:/Dev/Code/STSServer/org.eclipse.aperi.demo.sso/ConfigurationFiles" -Dorg.eclipse.higgins.sts.conf.file="ManagedClientConfiguration.xml" ' to the VM arguments
  • Back to the top