I am very pleased to announce the FOAFRealm 2.0.
The installation package should are available at the project web site at sourceforge.net.
Release changes
• You can create an invited only network (Orkut style).
• Improved web-browser compatibility issues.
• In contrast to the beta version, this release works with IE5++ and Opera 9++
• Added simple foafbrowser
• The code of the simple captcha is slightly rewritten, so now it can work on linux servers.
• 3 to 5 times shorter loading time because dojo is removed.
Minor problems
• Problems with the SMTP server
• The none picture now work
• Improved DIVs at the login page
• New layout of the buttons (now dojo is only for validation purposes)
• Added refresh captcha (still not perfect)
• After save you have to wait 10 seconds for another try
• The friend profile is updated after a change
Developers info
• The main part of the db module is rewritten.
• No more dependent on a tomcat/lib/(sesame jars)
• Now it uses own sesame jars and thus to make it work,
• Most likely you have to remove all sesame jars from tomcat/lib
Installation notes
1. Download the installation package.
2. Extract the war files: dfoaf-ui.war, dfoaf.war
2.1 Put those files to your tomcat/webapps folder
2.2 Download foafrealm.jar and foafrealm-toolbox.jar and put them to your tomcat/lib folder
3. You need also an RDF repository. The system was tested with sesame 1.2.5. If you decide to use sesame, you also need to put sesame.war to your tomcat/webapps
4. Run tomcat the wars will be automatically extracted.
5. The webapps need some customization.
5.1 You have to set up the repository.
e.g you can add the following entry to your sesame/WEB-INF/system.conf file:
<repository id="foafrealm-repository">
<title>Native RDF repository</title>
<sailstack>
<sail class="org.openrdf.sesame.sailimpl.sync.SyncRdfRepository"/>
<sail class="org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository">
<!-- The directory for storing the native SAIL's data files. -->
<param name="dir" value="/tmp/nativerdf/"/>
<!-- The triple indexes that should be used -->
<param name="triple-indexes" value="spo,ops"/>
</sail>
</sailstack>
<acl worldReadable="true" worldWritable="true">
<user login="testuser" readAccess="true" writeAccess="true"/>
</acl>
</repository>
5.2 Now you can change to default settings, if you use a different port than 8080 and/or address than localhost the soa service address is in foafrealm.jar which is in your tomcat/lib foafrealm.db, dfoaf-ui/WEB-INF/classes/foafrealm.properties - dfoaf-ui
You have to have a look at the application parameters and set them to correct values.
storageDir=/tmp/dwn2/
inviteFriends=true
inviteOnly=false
SOAaddress=http://localhost:8080/dfoaf/soa/
confirmRegistration=true
localShowPictureAddress=http://localhost:8080/dfoaf-ui/ShowPicture
registerCredentials=cmVnaXN0ZXJAZm9hZnJlYWxtLm9yZzpjaGFuZ2VpdCEh
• Create the storage dir at the path that storageDir variable points to.
• Make sure that the ShowPicture servlet address is correct.
• The SOAaddress should point to the dfoaf.war extraction point.
• The other parameters allows you to control the registration process.
5.3 SMTP configuration.
To make confirm registration and forgot password work you have to edit the SMTP parameters. The parameters are in the mail.properties file located in the foafrealm-toolbox.jar
6. Now you can visit http://localhost:8080/dfoaf-ui/
7. Using FOAFRealm in your own tomcat application is pretty easy.
You can just extend the dfoaf-ui project, or copy-it to your web-application.
You should use it by calling jsp-tags:
-profile - to access the user’s profile e.g.
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="foafrealm" tagdir="/WEB-INF/tags"%>
<foafrealm:profile />
-logout - to expose the logout button
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="foafrealm" tagdir="/WEB-INF/tags"%>
<foafrealm:logout redirect="index.jsp"/>
-tomcat - to perform the tomcat authentication e.g.
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="foafrealm" tagdir="/WEB-INF/tags"%>
<link href="${pageContext.request.contextPath}/css/foafclient.css" type="text/css" rel="stylesheet" />
<foafrealm:tomcat />
You need to edit your web-application context in the tomcat/conf/server.xml file
and add realm and valve, for example:
.....
<Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
docBase="myapp" path="/myapp"
privileged="true" reloadable="true" >
<Realm className="org.foafrealm.realm.FOAFRealm" debug="99"/>
<Valve className="org.foafrealm.realm.FOAFValve" debug="99"/>
</Context>
.....
</Host>
</Engine>
</Service>
</Server>
8. Enjoy,
I would like to thank all the people who gave me their feedback, especially Adam (SOA, comments on UI), Władek (RDF2Go), Peyman, and the everyone from Corrib and FOAFRealm groups.
Sławomir and Sebastian