Added by Sebastian Gonzalez Oyuela, last edited by Sebastian Gonzalez Oyuela on Jul 20, 2010
()
Labels:
Introduction
This is a quick start for integrating a JBoss application with JOSSO.
Prerequisites
- JOSSO Gateway configured and running (in any platform).
- JOSSO Agent configured in the selected platform.
- A Java Web/EJB Application.
Web Applications
1. Add the login-redirect.jsp page
Copy the login-redirect.jsp page provided by josso to your application resources directory.
login-redirect.jsp
<%@page contentType="text/html; charset=iso-8859-1" language="java" session="true" %> <% response.sendRedirect(request.getContextPath() + "/josso_login/"); %>
2. Configure the <login-config> section in the web.xml descriptor
Use the following login configuration for the web application
web.xml
...
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login-redirect.jsp</form-login-page>
<form-error-page>/login-redirect.jsp</form-error-page>
</form-login-config>
</login-config>
...
Jossified and non-jossified application coexistentce.
1. Tomcat Setup
In the $CATALINA_BASE/conf/server.xml file remove the following code if present
$CATALINA_BASE/conf/server.xml
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
2. Web Application Setup
For each non-jossified application add a <Context> with <Realm> configuration in $CATALINA_BASE/conf/<enginename>/<hostname>/<webapp_name>.xml
(i.e. In Catalina/localhost/manager.xml set the Tomcat Manager web application as non-jossified)
$CATALINA_BASE/conf/Catalina/localhost
<Context docBase="${catalina.home}/server/webapps/manager" privileged="true" antiResourceLocking="true" antiJARLocking="true"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
3. Restart Tomcat
This applies for Tomcat 5.5 and 6.0 |