From 1fc4824a66f809391d9d11a63aa5d965ea4c9b9d Mon Sep 17 00:00:00 2001 From: Mattias Arthursson Date: Thu, 19 Jun 2008 08:12:33 +0000 Subject: [PATCH] Added default page in web app, removed unnecessary files, and added some setup documentation. --- .../samples/spring-ldap-article/build.xml | 18 ----- .../spring-ldap-article/docs/base_data.ldif | 9 --- .../docs/ldap.conf.example | 21 ------ .../spring-ldap-article/docs/readme.txt | 52 -------------- .../spring-ldap-article/docs/setup_data.ldif | 70 ------------------- .../docs/teardown_data.ldif | 3 - mvn-build/samples/spring-ldap-article/ivy.xml | 31 -------- .../spring-ldap-article/project.properties | 10 --- .../samples/spring-ldap-article/readme.txt | 18 ++++- .../src/main/webapp/WEB-INF/jsp/welcome.jsp | 5 -- .../src/main/webapp/WEB-INF/web.xml | 4 ++ .../src/main/webapp/index.htm | 5 ++ 12 files changed, 26 insertions(+), 220 deletions(-) delete mode 100644 mvn-build/samples/spring-ldap-article/build.xml delete mode 100644 mvn-build/samples/spring-ldap-article/docs/base_data.ldif delete mode 100644 mvn-build/samples/spring-ldap-article/docs/ldap.conf.example delete mode 100644 mvn-build/samples/spring-ldap-article/docs/readme.txt delete mode 100644 mvn-build/samples/spring-ldap-article/docs/setup_data.ldif delete mode 100644 mvn-build/samples/spring-ldap-article/docs/teardown_data.ldif delete mode 100644 mvn-build/samples/spring-ldap-article/ivy.xml delete mode 100644 mvn-build/samples/spring-ldap-article/project.properties delete mode 100644 mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/jsp/welcome.jsp create mode 100644 mvn-build/samples/spring-ldap-article/src/main/webapp/index.htm diff --git a/mvn-build/samples/spring-ldap-article/build.xml b/mvn-build/samples/spring-ldap-article/build.xml deleted file mode 100644 index 5a85b7fa..00000000 --- a/mvn-build/samples/spring-ldap-article/build.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/mvn-build/samples/spring-ldap-article/docs/base_data.ldif b/mvn-build/samples/spring-ldap-article/docs/base_data.ldif deleted file mode 100644 index f06390db..00000000 --- a/mvn-build/samples/spring-ldap-article/docs/base_data.ldif +++ /dev/null @@ -1,9 +0,0 @@ -dn: dc=jayway,dc=se -objectclass: dcObject -objectclass: organization -o: jayway -dc: jayway - -dn: cn=Manager,dc=jayway,dc=se -objectclass:organizationalRole -cn: Manager diff --git a/mvn-build/samples/spring-ldap-article/docs/ldap.conf.example b/mvn-build/samples/spring-ldap-article/docs/ldap.conf.example deleted file mode 100644 index 3e7570c5..00000000 --- a/mvn-build/samples/spring-ldap-article/docs/ldap.conf.example +++ /dev/null @@ -1,21 +0,0 @@ -# -# LDAP Defaults -# - -# See ldap.conf(5) for details -# This file should be world readable but not world writable. - -#BASE dc=example, dc=com -#URI ldap://ldap.example.com ldap://ldap-master.example.com:666 - -#SIZELIMIT 12 -#TIMELIMIT 15 -#DEREF never - -include "[open_ldap_path]/schema/core.schema" -#include "c:/Program Files/OpenLDAP/schema/inetorgperson.schema" -database bdb -suffix "dc=jayway,dc=se" -rootdn "cn=Manager,dc=jayway,dc=se" -rootpw secret -directory "[open_ldap_path]/data" diff --git a/mvn-build/samples/spring-ldap-article/docs/readme.txt b/mvn-build/samples/spring-ldap-article/docs/readme.txt deleted file mode 100644 index 651f41f3..00000000 --- a/mvn-build/samples/spring-ldap-article/docs/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ -LDAP server setup for samples. - -We need to semi-manually set up the server environment. I have used -OpenLDAP (http://www.openldap.org/) with a minimal amount of data set up from an -LDIF file. - -There is a Windows version of OpenLDAP available at: - - http://lucas.bergmans.us/hacks/openldap/ - -The LDIF file and sample application both expect to find the base suffix -"dc=jayway,dc=se" in the LDAP Server. - -For help in setting up the LDAP environment, three files are supplied: -1. ldap.conf.example - Modify paths in this file to suit your installation by replacing - the placeholder [open_ldap_path]. -2. base_data.ldif - Base domain and Admin data as specified in ldap.conf. -3. setup_data.ldif - The data expected by the integration test cases. - -Start the LDAP Server: -slapd -d 1 -f ldap.conf.example - -Add the LDIF files (the default password in ldap.conf.example is "secret"): -ldapadd -x -D "cn=Manager,dc=jayway,dc=se" -W -f base_data.ldif -ldapadd -x -D "cn=Manager,dc=jayway,dc=se" -W -f setup_data.ldif - -Verify the installation by running this search: - -ldapsearch -LLL -b dc=jayway,dc=se "(objectclass=*)" dn - -It should result in a list that looks like this: - -dn: dc=jayway,dc=se - -dn: cn=Manager,dc=jayway,dc=se - -dn: c=Sweden,dc=jayway,dc=se - -dn: c=Norway,dc=jayway,dc=se -... - -You should now be all set to run the integration tests. - -If you choose to run the tests on another instance, or specifically with -another suffix than the one mentioned above, you may need to modify data in -the following files: - -setup_data.ldif -/src/iutest/config/ldap.properties diff --git a/mvn-build/samples/spring-ldap-article/docs/setup_data.ldif b/mvn-build/samples/spring-ldap-article/docs/setup_data.ldif deleted file mode 100644 index cdf07c46..00000000 --- a/mvn-build/samples/spring-ldap-article/docs/setup_data.ldif +++ /dev/null @@ -1,70 +0,0 @@ -dn: c=Sweden,dc=jayway,dc=se -objectclass: top -objectclass: country -c: Sweden -description: The country of Sweden - -dn: c=Norway,dc=jayway,dc=se -objectclass: top -objectclass: country -c: Norway -description: The country of Norway - -dn: ou=company1,c=Sweden,dc=jayway,dc=se -objectclass: top -objectclass: organizationalUnit -ou: company1 -description: First company in Sweden - -dn: ou=company2,c=Sweden,dc=jayway,dc=se -objectclass: top -objectclass: organizationalUnit -ou: company2 -description: Second company in Sweden - -dn: ou=company1,c=Norway,dc=jayway,dc=se -objectclass: top -objectclass: organizationalUnit -ou: company1 -description: First company in Norway - -dn: cn=Some Person,ou=company1,c=Sweden,dc=jayway,dc=se -objectclass: top -objectclass: person -cn: Some Person -sn: Person -description: Sweden, Company1, Some Person -telephoneNumber: +46 555-123456 - -dn: cn=Some Person2,ou=company1,c=Sweden,dc=jayway,dc=se -objectclass: top -objectclass: person -cn: Some Person2 -sn: Person2 -description: Sweden, Company1, Some Person2 -telephoneNumber: +46 555-654321 - -dn: cn=Some Person3,ou=company1,c=Sweden,dc=jayway,dc=se -objectclass: top -objectclass: person -cn: Some Person3 -sn: Person3 -description: Sweden, Company1, Some Person3 -telephoneNumber: +46 555-123654 - -dn: cn=Some Person,ou=company2,c=Sweden,dc=jayway,dc=se -objectclass: top -objectclass: person -cn: Some Person -sn: Person -description: Sweden, Company2, Some Person -telephoneNumber: +46 555-456321 - -dn: cn=Some Person,ou=company1,c=Norway,dc=jayway,dc=se -objectclass: top -objectclass: person -cn: Some Person -sn: Person -description: Norway, Company1, Some Person -telephoneNumber: +45 555-654123 - diff --git a/mvn-build/samples/spring-ldap-article/docs/teardown_data.ldif b/mvn-build/samples/spring-ldap-article/docs/teardown_data.ldif deleted file mode 100644 index 97ba7e6b..00000000 --- a/mvn-build/samples/spring-ldap-article/docs/teardown_data.ldif +++ /dev/null @@ -1,3 +0,0 @@ -c=Sweden,dc=jayway,dc=se - -c=Norway,dc=jayway,dc=se diff --git a/mvn-build/samples/spring-ldap-article/ivy.xml b/mvn-build/samples/spring-ldap-article/ivy.xml deleted file mode 100644 index 7ffd8d8b..00000000 --- a/mvn-build/samples/spring-ldap-article/ivy.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mvn-build/samples/spring-ldap-article/project.properties b/mvn-build/samples/spring-ldap-article/project.properties deleted file mode 100644 index 5e43e378..00000000 --- a/mvn-build/samples/spring-ldap-article/project.properties +++ /dev/null @@ -1,10 +0,0 @@ -# properties defined in this file are overridable by a local build.properties in this project dir - -# The location of the common build system -common.build.dir=${basedir}/../common-build - -javac.source=1.3 -javac.target=1.3 - -# extend common-build with source capability -main.build.configs=global,buildtime,test,source diff --git a/mvn-build/samples/spring-ldap-article/readme.txt b/mvn-build/samples/spring-ldap-article/readme.txt index 93ae89cc..97989434 100644 --- a/mvn-build/samples/spring-ldap-article/readme.txt +++ b/mvn-build/samples/spring-ldap-article/readme.txt @@ -1 +1,17 @@ -For setup instructions on how to run this sample project, see docs/readme.txt. \ No newline at end of file +Sample application demonstrating how to do the most basic stuff in Spring LDAP +A very simple dao implementation is provided in +org.springframework.ldap.samples.article.dao.PersonDaoImpl +It demonstrates some basic operations using Spring LDAP. For recerence purposes, +a corresponding implementation using ordinary Java LDAP/JNDI implementation is +available in TraditionalPersonDaoImpl. + +How to use: +----------- +The project is in a maven build structure. Make sure you have installed the samples-utils artifact, as this will be +needed for this project to work. + +mvn jetty:run will start up a web server demonstrating the capabilities. The web application will be available +under http://localhost:8080/spring-ldap-person-article/ + +mvn eclipse:eclipse will construct an eclipse project for you to use. Import that project into eclipse using +File/Import/Existing Project, and select this directory. diff --git a/mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/jsp/welcome.jsp b/mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/jsp/welcome.jsp deleted file mode 100644 index 9c99a2d7..00000000 --- a/mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/jsp/welcome.jsp +++ /dev/null @@ -1,5 +0,0 @@ - - -Hello - - \ No newline at end of file diff --git a/mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/web.xml b/mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/web.xml index f48d838c..3482f7a9 100644 --- a/mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/web.xml +++ b/mvn-build/samples/spring-ldap-article/src/main/webapp/WEB-INF/web.xml @@ -27,4 +27,8 @@ basic *.do + + + index.htm + diff --git a/mvn-build/samples/spring-ldap-article/src/main/webapp/index.htm b/mvn-build/samples/spring-ldap-article/src/main/webapp/index.htm new file mode 100644 index 00000000..c4a3f6f3 --- /dev/null +++ b/mvn-build/samples/spring-ldap-article/src/main/webapp/index.htm @@ -0,0 +1,5 @@ + + + + +