?? searchbyinitfactory.jsp
字號:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<HTML>
<HEAD><TITLE>Search by Init Factory Context</TITLE></HEAD>
<BODY>
<%@ taglib uri="http://jakarta.apache.org/taglibs/jndi-1.0" prefix="jndi" %>
<jndi:useDirContext
id="test"
scope="page"
initialFactory='<%=request.getParameter("initfac")%>'
providerUrl='<%=request.getParameter("provider")%>'
/>
The Context is "<%=test.toString()%>"<BR/>
The filter was "<%=request.getParameter("filter")%>"<br>
<table border="true">
<th>name</th><th>class</th><th>objectclass</th>
<jndi:search
countLimit='10'
contextRef='test'
filter='<%=request.getParameter("filter")%>'
name='<%=request.getParameter("name")%>'
id="result"
searchScope="SUBTREE_SCOPE"
bindings='false'
>
<tr>
<td><jsp:getProperty name="result" property="name" /></td>
<td><jsp:getProperty name="result" property="className" /></td>
<td><jndi:getAttribute ref='result' attribute='objectclass' multivalue='separator'><BR/></jndi:getAttribute></tf>
</tr>
</jndi:search>
</table>
First value of each attribute of last result:
<table border>
<th>attribute name</th><th>AttributeValue</TH>
<jndi:forEachAttribute ref='result' id='attr'>
<jndi:getAttribute ref='attr' id='val' multivalue='iterate'>
<tr>
<td><jsp:getProperty name='attr' property='ID'/></td>
<td><%=val%></td>
</tr>
</jndi:getAttribute>
</jndi:forEachAttribute>
</table>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -