Screencast 7 – LDAP Search Portlet for WebCenter with ADF

2
12 Flares 12 Flares ×
Subscribe to this Podcast on iTunes

One of the cornerstones of intranet functionality is the ability to quickly locate colleagues and obtain their contact information. In this episode of Enterprise 2.0 Workbench we take a look at using ADF to create a Data Control on top of a Java Bean that connects with an instance of LDAP / Active Directory.

One of the most powerful aspects of ADF is the ability to leverage Data Controls that abstract a web developer from having to know details of underlying data sources. In our sample we are going to illustrate how a Java Bean can be created, along with a search class and search method to expose LDAP functionality to developers who via the Data Control will be able to drag and drop items within the Data Control to declaratively create this portlet.

Sample Files and Purpose
For the purposes of our portlet development, the following are key files that we will use within our Fusion Web Application

1. DirectorySearch.java – this file contains the method that actually executes the search and returns the results to us. As it receives the results it adds the individual people into a List of Person beans. This class will be used to create our Data Control.

2. Person.java – this Java Bean will provide a container to hold the people that come back in the result set. We will take a look at how to create the structure of the bean, so that this same approach could be used with other projects.

3. GetLDAPUserImage.java – this provides a Servlet that will return the image stored for a given user in the LDAP system. We will not cover it in detail, but it provides a nice utility to let us enhance the results shown for a search by including a user’s photo.

4. LDAPSearch.jspx – our ADF page that will make use of the Data Control in order to provide the interface for the search and the result set.

5. web.xml – in this file we will setup Environment Entries that will be used by the GetLDAPUserImage servlet, as well as the DirectorySearch class to connect to LDAP. This allows us to abstract settings that are environment specific from our actual code.

6. WebCenter Template UI Snippet – at the bottom of this post I have included some navigation snippet code based on what we did in the Navigation Episode that now includes this “portlet”. For the purposes of our display in the UI I have chosen to keep things simple and just use an iFrame to hold the application within our nested list items. This is a hack, but a nice way to quickly provide the feature.

Weblogic Server Embedded LDAP Server Config
If you are going to try to use the embedded LDAP server in WLS for testing, keep in mind that you will need to set the password for connectivity. Set the password in the location below, this will be used to authenticate when using the cn=Admin user principal, as we have specified in our web.xml example in the source code below.

Thoughts on Possible Enhancements
This was made as an example to illustrate a series of platform features, but it may be interesting to expand in the following ways

  1. Expose this application via WSRP as a portlet and use portlet preferences to pass the LDAP configuration information. This could allow the base path to support various areas of a directory on the basis of a user’s role – e.g. collaboration portals may only want to expose contact information for peers within a business unit.
  2. Add additional attributes to the person object to make the display more comprehensive
  3. Add more detailed search options to allow filtering prior to the execution of the search

Happy coding!

Project Code
Download LDAP Search Portlet for WebCenter ADF Project Code

The following are the code samples used in our example. For the search it has been commented in a way with its LDAP connection information that will also apply to the LDAP connectivity in GetLDAPUserImage.java. Arguably, there are better ways to code this, but I have kept it simple for demonstration purposes.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
package E2Workbench;
 
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
 
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
 
public class DirectorySearch {
 
// Variables for LDAP connectivity
private String sLDAPBase;
private String sLDAPUrl;
private String sLDAPAuthType;
private String sLDAPPrincipal;
private String sLDAPPassword;
 
public DirectorySearch() {
super();
// Set defaults for our connectivity to LDAP
sLDAPBase = "";
sLDAPUrl = "";
sLDAPAuthType = "";
sLDAPPrincipal = "";
sLDAPPassword = "";
// Get the values from the web.xml file
try {
// Obtain the initial Java Naming and Directory Interface (JNDI) context
InitialContext initCtx = new InitialContext();
// Perform JNDI lookup to obtain the resource.
sLDAPBase = (String) initCtx.lookup("java:comp/env/LDAPBase");
sLDAPUrl = (String) initCtx.lookup("java:comp/env/LDAPUrl");
sLDAPAuthType = (String) initCtx.lookup("java:comp/env/LDAPAuthType");
sLDAPPrincipal = (String) initCtx.lookup("java:comp/env/LDAPPrincipal");
sLDAPPassword = (String) initCtx.lookup("java:comp/env/LDAPPassword");
}
catch (Exception ex)
{
}
}
public List<Person> SearchLDAPDirectory(String sSearchName) {
 
// Default search query to be performed against LDAP take a look at
// http://www.centos.org/docs/5/html/CDS/ag/8.0/Finding_Directory_Entries-LDAP_Search_Filters.html for
// some examples
String filter = "(objectclass=person)";
// Use the search value passed into this method if it contains a value
if (sSearchName != "")
{
filter = "(&(objectclass=person)(cn="+sSearchName+"*))";
}
 
// Create our collection of properties to be used in creating the LDAP connection
// the values are arrived at on the basis of the Environment Entries in the web.xml file
Properties env = new Properties();
env.put(DirContext.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(DirContext.PROVIDER_URL,sLDAPUrl);
env.put(Context.SECURITY_AUTHENTICATION, sLDAPAuthType);
env.put(Context.SECURITY_PRINCIPAL, sLDAPPrincipal);
env.put(Context.SECURITY_CREDENTIALS, sLDAPPassword);
// Create a list of our matches on the basis of our query
List<Person> lPersonMatches = new ArrayList();
try {
DirContext directoryConnection = new InitialDirContext(env);
SearchControls sc = new SearchControls();
sc.setSearchScope(SearchControls.SUBTREE_SCOPE);
// Create an object to hold the results from our query against LDAP
NamingEnumeration matchingDirectoryEntries = null;
 
// Perform the search
matchingDirectoryEntries = directoryConnection.search(sLDAPBase, filter, sc);
while (matchingDirectoryEntries.hasMore()) {
SearchResult result = (SearchResult) matchingDirectoryEntries.next();
// Uncomment the following line to see all of the values that are returned with the search result object
// System.out.println(result.toString()+"\n");
// Capture all of the attributes of the matching object (email, displayname, etc)
Attributes resultAttributes = result.getAttributes();
// Set default values for the Person object that we will create on the basis of this matching search result
String sEmail = "--";
String sName = "--";
String sPhone = "--";
String sDepartment = "--";
String sUid = "--";
 
// Check to make sure that an attribute is not null. If not, store it so it can be used to
// fill a Person object that we will create to hold the result
if (resultAttributes.get("mail") != null) {
sEmail = resultAttributes.get("mail").get().toString();
}
 
if (resultAttributes.get("displayname") != null) {
sName = resultAttributes.get("displayname").get().toString();
}
 
if (resultAttributes.get("telephonenumber") != null) {
sPhone = resultAttributes.get("telephonenumber").get().toString();
}
 
if (resultAttributes.get("description") != null) {
sDepartment = resultAttributes.get("description").get().toString();
}
if (resultAttributes.get("uid") != null) {
sUid = resultAttributes.get("uid").get().toString();
}
 
// Create a person object with the values in this loop itteration
Person FoundPerson = new Person(sName, sEmail, sPhone, sDepartment, sUid);
 
lPersonMatches.add(FoundPerson);
}
 
// Close connection to the directory
directoryConnection.close();
} catch (NamingException nex) {
// Oh snap! Something went wrong
System.err.println("Error: " + nex.getMessage());
}
// Send back our list of matching objects - in this case Person objects as deinfed in our accompanying bean
return lPersonMatches;
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
package view;
 
import javax.servlet.*;
import javax.servlet.http.*;
 
import java.io.IOException;
 
import javax.naming.*;
 
import java.io.*;
 
import java.util.*;
 
import javax.naming.directory.*;
 
public class GetLDAPUserImage extends HttpServlet {
private static final String CONTENT_TYPE =
"text/html; charset=windows-1252";
 
private String sLDAPBase;
private String sLDAPUrl;
private String sLDAPAuthType;
private String sLDAPPrincipal;
private String sLDAPPassword;
 
public void init(ServletConfig config) throws ServletException {
super.init(config);
 
// Connection process identical to the one in DirectorySearch.java
// for relevant comments, please refernece that code
 
sLDAPBase = "";
sLDAPUrl = "";
sLDAPAuthType = "";
sLDAPPrincipal = "";
sLDAPPassword = "";
 
try {
InitialContext initCtx = new InitialContext();
 
sLDAPBase = (String)initCtx.lookup("java:comp/env/LDAPBase");
sLDAPUrl = (String)initCtx.lookup("java:comp/env/LDAPUrl");
sLDAPAuthType =
(String)initCtx.lookup("java:comp/env/LDAPAuthType");
sLDAPPrincipal =
(String)initCtx.lookup("java:comp/env/LDAPPrincipal");
sLDAPPassword =
(String)initCtx.lookup("java:comp/env/LDAPPassword");
} catch (Exception ex) {
}
 
}
 
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
doPost(request, response);
}
 
public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
 
// Thanks to Buster Nimmons for the following code snippet to inspire this servlet
// original source - http://www.mail-archive.com/[email protected]/msg41646.html
 
response.setContentType("image/jpeg");
 
// ID of the users image to retrive
String userId = request.getParameter("userId");
byte bt[] = null;
 
//get the OutputStream to send the image back to the browser
OutputStream ot = response.getOutputStream();
try {
String filter = "(uid=" + userId + ")";
 
// make connection to LDAP and lookup user
Properties env = new Properties();
env.put(DirContext.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(DirContext.PROVIDER_URL, sLDAPUrl);
env.put(Context.SECURITY_AUTHENTICATION, sLDAPAuthType);
env.put(Context.SECURITY_PRINCIPAL, sLDAPPrincipal);
env.put(Context.SECURITY_CREDENTIALS, sLDAPPassword);
 
DirContext directoryConnection = new InitialDirContext(env);
SearchControls sc = new SearchControls();
sc.setSearchScope(SearchControls.SUBTREE_SCOPE);
 
NamingEnumeration matchingDirectoryEntries = null;
 
// Perform search
matchingDirectoryEntries =
directoryConnection.search(sLDAPBase, filter, sc);
 
while (matchingDirectoryEntries.hasMore()) {
SearchResult result =
(SearchResult)matchingDirectoryEntries.next();
Attributes attrs = result.getAttributes();
 
// get the jpegPhoto attribute of this users entry (getValue returns an Object which I cast to byte[])
bt = (byte[])(attrs.get("jpegPhoto").get());
 
//write the byte[] to the OutputStream
ot.write(bt);
 
//close OutputStream and we're done
ot.close();
}
 
directoryConnection.close();
} catch (Exception ex) {
 
}
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" inlineStyle="width:320.0px;">
<af:messages id="m1"/>
<af:outputText value="People Search" id="ot2"
inlineStyle="font-size:1.4em; font-weight:600; margin-left: 7px;"/>
<af:form id="f1">
<af:decorativeBox id="db1" styleClass="AFStretchWidth"
inlineStyle="height:360.0px; margin-left: 5px">
<f:facet name="center">
<af:panelGroupLayout xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl1" layout="default">
<af:table value="#{bindings.Person.collectionModel}" var="row"
rows="#{bindings.Person.rangeSize}"
emptyText="#{bindings.Person.viewable ? 'Search via the form above.' : 'Access Denied.'}"
fetchSize="#{bindings.Person.rangeSize}"
rowBandingInterval="1"
filterModel="#{bindings.PersonQuery.queryDescriptor}"
queryListener="#{bindings.PersonQuery.processQuery}"
filterVisible="false" varStatus="vs" id="t1"
columnStretching="last" width="100%" contentDelivery="immediate"
verticalGridVisible="false">
<af:column sortProperty="name" filterable="false" sortable="false"
id="c1">
<af:image source="../getldapuserimage?userId=#{row.userid}"
id="userimage"
inlineStyle="width:80px; text-align:left;"/>
</af:column>
<af:column sortProperty="email" filterable="false"
sortable="false"
id="c5">
<af:outputText value="#{row.name}" id="ot4"/>
<af:outputText value="#{row.email}" id="ot3"/>
<af:outputText value="#{row.phone}" id="ot5"/>
 
<af:outputText value="#{row.description}" id="ot1"/>
</af:column>
</af:table>
</af:panelGroupLayout>
</f:facet>
<f:facet name="top">
<af:panelGroupLayout layout="horizontal"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl2"
inlineStyle="margin-top: 10px; margin-left: 8px">
<af:inputText value="#{bindings.sSearchName.inputValue}"
label="Name"
required="#{bindings.sSearchName.hints.mandatory}"
columns="#{bindings.sSearchName.hints.displayWidth}"
maximumLength="#{bindings.sSearchName.hints.precision}"
shortDesc="#{bindings.sSearchName.hints.tooltip}"
id="it1">
<f:validator binding="#{bindings.sSearchName.validator}"/>
</af:inputText>
<af:commandButton actionListener="#{bindings.SearchLDAPDirectory.execute}"
text="Go"
disabled="#{!bindings.SearchLDAPDirectory.enabled}"
id="cb1"/>
</af:panelGroupLayout>
</f:facet>
</af:decorativeBox>
</af:form>
</af:document>
</f:view>
</jsp:root>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<div id="navbox">
<c:set var="navNodes" value="${navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}" scope="session"/>
<ul id="nav">
<c:forEach var="menu" varStatus="vs" items="${navNodes}">
<li class="parentnode">
<a href="/webcenter${menu.goLinkPrettyUrl}" class="${menu.selected}">${menu.title}</a>
<c:if test="${not empty menu.children}">
<ul>
<c:forEach var="child" items="#{menu.children}">
<li class="childnode">
<a href="/webcenter${child.goLinkPrettyUrl}">${child.title}</a>
<c:if test="${not empty child.children}">
<ul>
<c:forEach var="grandchild" items="#{child.children}">
<li class="grandchildnode">
<a href="/webcenter${grandchild.goLinkPrettyUrl}">${grandchild.title}</a>
</li>
</c:forEach>
</ul>
</c:if>
</li>
</c:forEach>
</ul>
</c:if>
</li>
</c:forEach>
<c:if test="${securityContext.authenticated}">
<![CDATA[
<li class="parentnode">
<a href="#">People Search</a>
<ul>
<li class="childnode">
<iframe src="http://127.0.0.1:7101/LDAPSearchPortlet-ViewController-context-root/faces/LDAPSearch.jspx" width="330" height="360" frameborder="0"></iframe>
</li>
</ul>
</li>
]]>
</c:if>
</ul>
</div>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
package E2Workbench;
 
public class Person {
private String name;
private String email;
private String phone;
private String description;
private String userid;
 
public Person(String name, String email, String phone, String description, String userid) {
this.name = name;
this.email = email;
this.phone = phone;
this.description = description;
this.userid = userid;
}
 
public void setName(String name) {
this.name = name;
}
 
public String getName() {
return name;
}
 
public void setEmail(String email) {
this.email = email;
}
 
public String getEmail() {
return email;
}
 
public void setPhone(String phone) {
this.phone = phone;
}
 
public String getPhone() {
return phone;
}
 
public void setDescription(String description) {
this.description = description;
}
 
public String getDescription() {
return description;
}
 
public void setUserid(String userid) {
this.userid = userid;
}
 
public String getUserid() {
return userid;
}
}
view raw Person.java This Gist brought to you by GitHub.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name>
<param-value>never</param-value>
</context-param>
<context-param>
<description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
<param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
<param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
<param-value>false</param-value>
</context-param>
<filter>
<filter-name>trinidad</filter-name>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
</filter>
<filter>
<filter-name>adfBindings</filter-name>
<filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>trinidad</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>adfBindings</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>BIGRAPHSERVLET</servlet-name>
<servlet-class>oracle.adfinternal.view.faces.bi.renderkit.graph.GraphServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>BIGAUGESERVLET</servlet-name>
<servlet-class>oracle.adfinternal.view.faces.bi.renderkit.gauge.GaugeServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>MapProxyServlet</servlet-name>
<servlet-class>oracle.adfinternal.view.faces.bi.renderkit.geoMap.servlet.MapProxyServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>GatewayServlet</servlet-name>
<servlet-class>oracle.adfinternal.view.faces.bi.renderkit.graph.FlashBridgeServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>GetLDAPUserImage</servlet-name>
<servlet-class>view.GetLDAPUserImage</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/afr/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>BIGRAPHSERVLET</servlet-name>
<url-pattern>/servlet/GraphServlet/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>BIGAUGESERVLET</servlet-name>
<url-pattern>/servlet/GaugeServlet/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>MapProxyServlet</servlet-name>
<url-pattern>/mapproxy/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/bi/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GatewayServlet</servlet-name>
<url-pattern>/flashbridge/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetLDAPUserImage</servlet-name>
<url-pattern>/getldapuserimage</url-pattern>
</servlet-mapping>
<mime-mapping>
<extension>swf</extension>
<mime-type>application/x-shockwave-flash</mime-type>
</mime-mapping>
<env-entry>
<description>Base for LDAP Queries</description>
<env-entry-name>LDAPBase</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>dc=wc_domain</env-entry-value>
</env-entry>
<env-entry>
<description>LDAP Connection URL</description>
<env-entry-name>LDAPUrl</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>ldap://owcvm03:7001</env-entry-value>
</env-entry>
<env-entry>
<description>Authentication method used for LDAP</description>
<env-entry-name>LDAPAuthType</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>simple</env-entry-value>
</env-entry>
<env-entry>
<description>User to connect to LDAP in format cn=username</description>
<env-entry-name>LDAPPrincipal</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>cn=Admin</env-entry-value>
</env-entry>
<env-entry>
<description>Password for user connecting to LDAP</description>
<env-entry-name>LDAPPassword</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>welcome1</env-entry-value>
</env-entry>
</web-app>
view raw web.xml This Gist brought to you by GitHub.

Related Articles

Post comment as twitter logo facebook logo
Sort: Newest | Oldest