??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲A∨精品一区二区三区,亚洲国产精品一区二区三区久久 ,亚洲中文字幕成人在线http://www.tkk7.com/huabingl/category/11666.html走过的\zh-cnTue, 19 Feb 2008 08:08:29 GMTTue, 19 Feb 2008 08:08:29 GMT60axis userguide(2)http://www.tkk7.com/huabingl/archive/2008/02/17/180248.htmlbingebingeSun, 17 Feb 2008 04:17:00 GMThttp://www.tkk7.com/huabingl/archive/2008/02/17/180248.htmlhttp://www.tkk7.com/huabingl/comments/180248.htmlhttp://www.tkk7.com/huabingl/archive/2008/02/17/180248.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/180248.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/180248.html发布service
?U发布方式,一U是实例发布Q一U是描述W发?br /> 实例发布很简?br />   把我们的java源文件拷贝到axis目录下,Ҏ展名为jws
  然后可以直接访问了Q例如:
java samples.userguide.example2.CalcClient -p8080 add 2 5
 他将调用addҎQ传递的2个变量分别ؓ2??br /> 很显ӞW一U方法有很多弊端Q比如需要源文gQ不能有包\径等{?br /> 描述W发?br /> 一个最单的例子如下Q?br /> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  <service name="MyService" provider="java:RPC">
    <parameter name="className" value="samples.userguide.example3.MyService"/>
    <parameter name="allowedMethods" value="*"/>
  </service>
</deployment>
一个服务是一个targeted chain ,可能包含下面的一些或者全部:hHandlerQpivot Handler 支点HandlerQ响应Handler。支点hander在服务中叫做provider,在例子中我们的provider是java:RPCQ他被axis内嵌Q代表了Java RPC serviceQ具体的cLorg.apache.axis.providers.java.RPCProvider.
我们告诉RPCProvider 我们要调用的服务MyServiceQƈ以参数的形式告诉他具体的目标以及可以被调用的Ҏ?br /> 我们也可以给我们要调用的对象讄作用范围scope,和servlet的scope一P有request,session,application.
我们需要把q个描述W定义的内容告诉应用服务器才能真正提供我们需要的服务?br /> 如果已经部vaxis到tomcat,我们可以q样发布
org.apache.axis.client.AdminClient deploy.wsdd
q样我们的服务就可以通过soap来访问了
试一?br /> java samples.userguide.example3.Client
  -lhttp://localhost:8080/axis/services/MyService "test me!"
可以通过下面来查看所有已l部|的服务
java org.apache.axis.client.AdminClient list
来看看更q一步的应用Q用一下request handler
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  <!-- define the logging handler configuration -->
  <handler name="track" type="java:samples.userguide.example4.LogHandler">
    <parameter name="filename" value="MyService.log"/>
   </handler>

  <!-- define the service, using the log handler we just defined -->
  <service name="LogTestService" provider="java:RPC">
    <requestFlow>
      <handler type="track"/>
    </requestFlow>

    <parameter name="className" value="samples.userguide.example4.Service"/>
    <parameter name="allowedMethods" value="*"/>
  </service>
</deployment>
q个例子会在客户端掉用LogTestService的时候,先调用samples.userguide.example4.LogHandler作记录操?br /> q程理
默认状态下Qaxis只允许在axis部v的机器上使用理hQ如果希望在其他的机器上q行理操作可以参照下面的例?/p>

<service name="AdminService" provider="java:MSG">
  <parameter name="className" value="org.apache.axis.util.Admin"/>
  <parameter name="allowedMethods" value="*"/>
  <parameter name="enableRemoteAdmin" value="true"/>
</service>
注意Q这样配|需要作必要的安全配|?/p>

binge 2008-02-17 12:17 发表评论
]]>
osworkflow几个主要lg和概?http://www.tkk7.com/huabingl/archive/2008/02/17/180236.htmlbingebingeSun, 17 Feb 2008 02:36:00 GMThttp://www.tkk7.com/huabingl/archive/2008/02/17/180236.htmlhttp://www.tkk7.com/huabingl/comments/180236.htmlhttp://www.tkk7.com/huabingl/archive/2008/02/17/180236.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/180236.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/180236.html原文?

http://blog.csdn.net/huabingl/archive/2008/02/12/2089145.aspx

binge 2008-02-17 10:36 发表评论
]]>
用opencms java API获取资源信息http://www.tkk7.com/huabingl/archive/2008/02/17/180234.htmlbingebingeSun, 17 Feb 2008 02:34:00 GMThttp://www.tkk7.com/huabingl/archive/2008/02/17/180234.htmlhttp://www.tkk7.com/huabingl/comments/180234.htmlhttp://www.tkk7.com/huabingl/archive/2008/02/17/180234.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/180234.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/180234.html原文?br />

http://blog.csdn.net/huabingl/archive/2008/02/12/2088711.aspx

binge 2008-02-17 10:34 发表评论
]]>
opencms分页 http://www.tkk7.com/huabingl/archive/2008/02/17/180233.htmlbingebingeSun, 17 Feb 2008 02:31:00 GMThttp://www.tkk7.com/huabingl/archive/2008/02/17/180233.htmlhttp://www.tkk7.com/huabingl/comments/180233.htmlhttp://www.tkk7.com/huabingl/archive/2008/02/17/180233.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/180233.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/180233.htmlopencms列表昄
 先准备要昄的数据。比如在站点下徏立一个sports目录Q里面以news的格式放入一些xmlpage.
  注意l这些xmlpage准备好detail昄面?br /> <%@ taglib prefix="cms" uri=" <%@ page import="java.util.*"%>
<%@ page import="org.opencms.jsp.*"%>

<%
String sPageIndex=request.getParameter("pageIndex");
int iPageIndex=1;
if(sPageIndex!=null){
iPageIndex=Integer.parseInt(sPageIndex);
}

 pageContext.setAttribute("pageIndex", iPageIndex+"");
%>
<cms:contentload collector="allInFolderDateReleasedDesc" param="/myfirstsite/sports/%(number)_news.html|news" pageIndex="%(pageContext.pageIndex)" pageSize="2">
<cms:contentinfo var="contentInfo" scope="request" />
<a href="<cms:link><cms:contentshow element="%(opencms.filename)"/></cms:link>" target=_blank><cms:contentshow element="Title"/> </a>
<%out.println("---");%>
</cms:contentload>
<%
CmsContentInfoBean info  = (CmsContentInfoBean)request.getAttribute("contentInfo");
int totalNum=info.getResultSize();
%>
?lt;%=totalNum%>条数?当前W?lt;%=info.getPageIndex()%>/<%=info.getPageCount()%>
<a href="list_taglib?pageIndex=<%=info.getPageNavStartIndex()%>">W一?lt;/a>
<a href="list_taglib?pageIndex=<%=(info.getPageNavStartIndex()-1)>0?(info.getPageNavStartIndex()-1):1%>">上一?lt;/a>
<a href="list_taglib?pageIndex=<%=(info.getPageNavStartIndex()+1)>info.getPageCount()?info.getPageCount():(info.getPageNavStartIndex()+1)%>">下一?lt;/a>
<a href="list_taglib?pageIndex=<%=info.getPageNavEndIndex()%>">最后页</a>
上面的例子力求尽可能的使用标签。主要用了CmsContentInfoBean QCmsJspXmlContentBean QI_CmsXmlContentContainerQCmsJspTagContentLoad Q等多个对象。分늚关键在CmsContentInfoBean ?CmsJspTagContentLoad的关pM?nbsp;

参考资?

http://www.javaedu.com/bbs/viewthread?thread=128

http://wangyi878750.blog.sohu.com/41725191.html

http://l--w.blog.sohu.com/47996664.html

http://wangyi878750.blog.sohu.com/41378072.html

 



binge 2008-02-17 10:31 发表评论
]]>
Sliding into WebDAVhttp://www.tkk7.com/huabingl/archive/2007/01/03/91624.htmlbingebingeWed, 03 Jan 2007 12:49:00 GMThttp://www.tkk7.com/huabingl/archive/2007/01/03/91624.htmlhttp://www.tkk7.com/huabingl/comments/91624.htmlhttp://www.tkk7.com/huabingl/archive/2007/01/03/91624.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/91624.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/91624.html阅读全文

binge 2007-01-03 20:49 发表评论
]]>
HibernateTemplateҎhttp://www.tkk7.com/huabingl/archive/2006/12/26/90128.htmlbingebingeTue, 26 Dec 2006 07:47:00 GMThttp://www.tkk7.com/huabingl/archive/2006/12/26/90128.htmlhttp://www.tkk7.com/huabingl/comments/90128.htmlhttp://www.tkk7.com/huabingl/archive/2006/12/26/90128.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/90128.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/90128.html阅读全文

binge 2006-12-26 15:47 发表评论
]]>
webdav使用指南http://www.tkk7.com/huabingl/archive/2006/12/10/86663.htmlbingebingeSun, 10 Dec 2006 04:40:00 GMThttp://www.tkk7.com/huabingl/archive/2006/12/10/86663.htmlhttp://www.tkk7.com/huabingl/comments/86663.htmlhttp://www.tkk7.com/huabingl/archive/2006/12/10/86663.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/86663.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/86663.html  最q研I了一下webdav,关于webdav的详l信息可以在 google上搜索或者参看官方网?a WebDAV stands for "Web-based Distributed Authoring and Versioning". It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers. "
 W者简单的试了它下面的slide和mod_dav.
slide是jakarta下面的子目,分ؓ服务端和客户?个h认ؓ服务端是专门为tomcat定做的一个webdav实现.关于slide,javaeye上有些讨?可以参?a >http://www.javaeye.com/t/5267.html.本h涉入的不是很?中文问题让我到?slide提供2中存储方?文g形式和数据库形式,限于旉,W者没有对数据库Ş式进行测?slide的工作目录默认在服务器bin目录?
用mod_dav来实?/span>相比q单多?如果你熟悉apache httpserver,应该很容易搞?http://www.webdav.org/mod_dav/ 上的有部分资?可以Ҏhttp://www.webdav.org/mod_dav/install.html 的讲解来配置.apache server1.3以后(包括1.3)在发布的时候都自带了mod_dav?需要做的就是加载和配置?
LoadModule dav_module libexec/libdav.so
AddModule mod_dav.c
W者在配置的时候由于没有认真看文档,犯了个小的错误.所以注意下面的文字:
"In the following example, the DAV lock database will be stored in the /usr/local/apache/var directory (which must be writable by the server process). The file's name will be DAVLock when mod_dav needs to create it.
(actually, mod_dav will create one or more files using this file name plus an extension)

DAVLockDB /usr/local/apache/var/DAVLock"
然后你需要配|一个webdav的工作目?׃讉Kapache服务的用户会默认是nobody用户,所以你臛_得让工作目录对nobody可读?在目录的定义中加入DAV onq样的属性就 ok?br>eg:
"Alias /pages /home/www/davhome
<Location /pages>
    DAV On
</Location>
"
试webdav
安装完webdav后,你可以做单的试Q?br>   IE览?〉文?〉打开Q然后输入配|的urlQ?a .可以看到效果?br>客户端API.
如果?java可以 采用slide的客L.(php用户咋办?).
q个最新的客户端用的是最新的jdom,注意?.
参考资料:
http://www.uplinux.com/www/net/02/131.shtml



binge 2006-12-10 12:40 发表评论
]]>
mvnforum权限pȝ分析http://www.tkk7.com/huabingl/archive/2006/09/19/70435.htmlbingebingeTue, 19 Sep 2006 02:07:00 GMThttp://www.tkk7.com/huabingl/archive/2006/09/19/70435.htmlhttp://www.tkk7.com/huabingl/comments/70435.htmlhttp://www.tkk7.com/huabingl/archive/2006/09/19/70435.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/70435.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/70435.html   mvnforum是一个开源的论坛软g.|址如下:
http://sourceforge.net/projects/mvnforum/
   本文主要研究它的权限部分,以作Z用借鉴.
   q里有篇中文的文?以作参?
  http://www.cn-java.com/target/news.php?news_id=3298


权限部分的UML囑֦?
  

数据程:
1Q系l从OnlineUserManagerq个入口q入.q个部g有个Map用来存储当前的非q期用户。OnlineUserManager会先Ҏ当前旉和最后一个用Lh旉做对比,查是否有hq期用户的必要,如果过所讄的时_那么先更新Map。然后OnlineUserManagerҎ提供的用L sessionid和username在这个Map中查找。如果找刎ͼ则刷新该用户的最后一ơ访问时_否则QOnlineUserManager调用OnlineUserFactory部g创徏该OnlineUserQƈ把这个OnlineUser存入Map之中?br />判对用户是否q期的原理是:从OnlineUser的OnlineUserAction中取出最后一ơ的讉K旉和当前时间做Ҏ.
2QOnlineUserFactory负责创徏OnlineUserqؓ该OnlineUser提供完整的权限信?OnlineUser包括3大部分信?一部分是用L基本信息,一部分是用L权限信息,一部分是用L在线信息.在线信息由OnlineUserManager负责理,其他2部分信息由OnlineUserFactory从持久层获得.
获得权限信息q把它设|到OnlineUser部g?提供lOnlineUserManager理.
3.CNMPermissionFactorycM我们常说的service.主要负责和持久层通信,最l返回一个CNMPermission部g供OnlineUserFactory合成OnlineUser部g.在下面的章节?W者会对他l化讨论.
权限l构:
用来实现用户权限的主要的是CNMPermission接口和他?个子cAbstractPermission和CNMPermissionImpl.CNMPermission接口负责定义权限有关的常量和对外API.AbstractPermission讄了保存权限信息的变量q实CCNMPermission接口中定义的抽象Ҏ,因此,W者把q个抽象cd做鉴权类.CNMPermissionImpl 则负责对AbstractPermission使用的变量进行设?因此,W者称之ؓ赋权c?
先看看AbstractPermission的结构。这里涉及到q么几个概念Q全局权限Q特定权限,单个权限Q组合权限?br />全局权限用true/false来设|?br />特定权限是指某一个动作所作用的不同的对象。比如:某用户只能将写操作作用于1Q?Q?q?个论坛板块之上。表CZؓq个特定权限内部的ArrayList容器中只?Q?Q?三个~号?br />单个权限是指单个动作。比如读操作?br />l合权限是ؓ了方便设|提供的对单个权限的l合。比如对某用户一ơ设|某板块的“读”和“发布?U权限?br />?U权限是一个纬度的划分Q后2个是另一个纬度的划分?br />如何鉴权Q?br />鉴权的接口都会在CNMPermission中定义。对全局权限Q直接返回对应的标志位的|对于特定权限Q则先判断是否特定权限全开Q否Q则然后判断其ArrayList中是否包含对应的对象~号?br />如何赋权Q?br />q里要承接到上述数据程的第三步。由CNMPermissionFactoryҎ一定先后@序(其实无关序Q因为采用的为真覆盖原则Q即持久层返回的权限都是真|后面的真值对前面的真值可覆盖Q从持久层获得所有的全局权限和特定权限。mvnforum只有用户和角?U概念(当然也可以扩展)Q因此它的顺序是Q用户全局全县-〉用L定权?〉角色全局全县-〉角色特定权限。当然无论哪一部都是对同一个CNMPermissionq行操作?br />无论在设|全局权限q是特定权限的时候都可能会遇到所定义的组合权限。具体的l合权限拆分是由CNMPermissionImpl来做?
相关的表l构Q?br />   member表,存贮用户基本信息?br />   membergroup ,存储用户和组Q角Ԍ的对应关pR?br />   groups表,存储l?角色的基本信?br />   grouppermissionQ存储组/角色的全局权限,字段为groupid permissionid
   groupforumQ存储组/角色 的论坛权? 字段为groupid ,forum,permissionid
   memberpermission 存贮用户的全局权限,字段?memberid permissionid
   memberforum 存贮用户的论坛权?字段为memberid ,forum,permissionid


  修改?006/12/16  ??br />



binge 2006-09-19 10:07 发表评论
]]>
OpenLDAP快速上?/title><link>http://www.tkk7.com/huabingl/archive/2006/08/26/65886.html</link><dc:creator>binge</dc:creator><author>binge</author><pubDate>Sat, 26 Aug 2006 00:37:00 GMT</pubDate><guid>http://www.tkk7.com/huabingl/archive/2006/08/26/65886.html</guid><wfw:comment>http://www.tkk7.com/huabingl/comments/65886.html</wfw:comment><comments>http://www.tkk7.com/huabingl/archive/2006/08/26/65886.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.tkk7.com/huabingl/comments/commentRss/65886.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/huabingl/services/trackbacks/65886.html</trackback:ping><description><![CDATA[ <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US">OpenLDAP</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">快速上?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <span style="mso-spacerun: yes">   </span>Ben </span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的项目里面要用到</span> <span lang="EN-US">OpenLDAP,</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我的目里面也要用到</span> <span lang="EN-US">LDAP,</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所以这</span> <span lang="EN-US">2</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">天集中看了一?/span> <span lang="EN-US">LDAP</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">相关的内宏V做了个W记Q也是Zhcȝ识的U篏做点或有或无的A献?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <span style="mso-spacerun: yes">   </span>OpenLDAP</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的官方站Ҏ</span> <span lang="EN-US"> <a >http://www.openldap.org</a> </span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> <span lang="EN-US"> <span style="mso-tab-count: 1">       </span> </span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上面有个</span> <span lang="EN-US">QuickStart,</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我将大致按照q个来讲解?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l4 level1 lfo1; tab-stops: list 42.0pt"> <span lang="EN-US" style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一?/span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装</span> <span lang="EN-US"> <br /> </span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在官方站点上发布的是</span> <span lang="EN-US">linux/unix</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</span> <span lang="EN-US">OpenLDAP</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">源文Ӟ当然也很Ҏ扑ֈ</span> <span lang="EN-US">windows</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ下的版本。笔者学习安装的是</span> <span lang="EN-US">windows</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">版本的?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l4 level1 lfo1; tab-stops: list 42.0pt"> <span lang="EN-US" style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二?/span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置</span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span lang="EN-US">OpenLDAP</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span> <span lang="EN-US">2</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个用hx的配|文件?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个是</span> <em> <span lang="EN-US">slapd.conf</span> </em> <em> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在他里面定义了最基本?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">DN</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以及理员的账号和密码?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">另一个是</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">LDIF</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的文件。在它里面可以配|所有的用户和组l?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 60.0pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">1?span style="FONT: 7pt 'Times New Roman'">  </span></span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们先来了解</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">LDAP</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的相xc?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <br /> </span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们知道</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">LDAP</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的全UCؓQ?/span> </em> <span lang="EN-US">Lightweight Directory Access Protocol</span> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q,卌量目录讉K协议?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <b> <span lang="EN-US" style="FONT-STYLE: normal">Ldap</span> </b> </em> <em> <b> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是怎样的一个结构呢</span> </b> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q用官方的话_?/span> </em> <span lang="EN-US">In LDAP, directory entries are arranged in a hierarchical tree-like structure. Traditionally, this structure reflected the geographic and/or organizational boundaries. Entries representing countries appear at the top of the tree. Below them are entries representing states and national organizations. Below them might be entries representing organizational units, people, printers, documents, or just about anything else you can think of..</span> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">”他是一个树状的l构。每一个节点被UCؓ一?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">Entry</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。这?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">Entry</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有着有趣的含义?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面是他?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">2</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个实例。一个反映了</span> </em> <span lang="EN-US">geographic</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q一个反映了</span> <span lang="EN-US">organizational</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?br /></span> <span lang="EN-US"> <img src="http://www.openldap.org/doc/admin23/intro_tree.gif" /> <br />                                                           传统命名<br /><img src="http://www.openldap.org/doc/admin23/intro_dctree.gif" /><br />                                                           |络命名<br /><br /></span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们来看看个个节点的定义方式?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <b> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">每个</span> <span lang="EN-US">Entry</span> </b> <b> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都有一个自己得一个标C?/span> </b> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q我们把他叫</span> <span lang="EN-US">DN(Distinguished Name)</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q这?/span> <span lang="EN-US">dn</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包含了一?/span> <span lang="EN-US">RDN</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/span> <span lang="EN-US">Relative Distinguished Name</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q。在上面的第二个图例</span> <span style="FONT-FAMILY: 宋体">中,<span lang="EN-US">Barbara Jensen的RDN?/span></span> <tt> <span lang="EN-US" style="FONT-FAMILY: 宋体; mso-bidi-font-family: 'Times New Roman'; mso-ansi-font-size: 10.5pt">uid=babsQ他的dn?/span> </tt> <tt> <span lang="EN-US" style="FONT-FAMILY: 宋体; mso-ansi-font-size: 10.5pt">uid=babs,ou=People,dc=example, dc=com?o:p></o:p></span> </tt> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <tt> <b> <span style="FONT-FAMILY: 宋体; mso-ansi-font-size: 10.5pt">每个节点都需要一个类?/span> </b> </tt> <tt> <span style="FONT-FAMILY: 宋体; mso-ansi-font-size: 10.5pt">Q?/span> </tt> <tt> <span style="FONT-FAMILY: 宋体; mso-bidi-font-family: 'Times New Roman'; mso-ansi-font-size: 10.5pt">q个cd信息?span lang="EN-US">objectClass来表C。ObjectClass是该节点的schema,他定义了该节点该有和不该有的属性。默认的objectClass都在schema/core.schema中有定义。如果在你的配置q程中出C关于找不到objectClass的问题,您不妨参看一下这里面有没有你用到的objectClass</span></span> </tt> <tt> <span lang="EN-US" style="FONT-FAMILY: 宋体; mso-ansi-font-size: 10.5pt">.</span> 在schema文g夹下q有其他一些schema文g,你也可以定义自己的schema.惌加蝲其他的schema,你可以在slapd.conf文g中用include加入.?<font face="宋体">include  ./schema/core.schema.</font></tt> <span style="FONT-FAMILY: 宋体">Z方便识别Q其实我们在<span lang="EN-US">DN里面用的都是objectClass的简写Ş式。如Qou代表organizationUnitQc代表country,st代表state,dc代表Q?{?/span></span> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 60.0pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">2?span style="FONT: 7pt 'Times New Roman'">  </span></span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来看?/span> <span lang="EN-US">slapd.conf</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q个文g</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <br /> </span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q个文g的主要信息是如下几行Q?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">database bdb <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">suffix "dc=<MY-DOMAIN>,dc=<COM>" <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">rootdn "cn=Manager,dc=<MY-DOMAIN>,dc=<COM>" <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">rootpw secret <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">directory /usr/local/var/openldap-data<o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义了数据库Q最基本的后~Q管理员?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">dn</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和密码,以及数据存放路径?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">~辑好这个文Ӟ我们可以启动了?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果你把</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">ldap</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">安装?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">windows</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务Q你可以像我一样启动:</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">net start OpenLDAP-slapd<o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 60.0pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">3?span style="FONT: 7pt 'Times New Roman'">  </span></span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们主要操作的就是这?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">LDIF</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文g</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <br /> </span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们需要在q个文g里面加入所需要的</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">dn.<o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">注意Q因为我们在</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">slapd.conf</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中定义了一?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">base dn</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和一个管理员</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">dn</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q所以我们需要首先把q?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">2</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">dn </span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">加进来?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">dn: dc=<MY-DOMAIN>,dc=<COM> <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">objectclass: dcObject <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">objectclass: organization <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">o: <MY ORGANIZATION> <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">dc: <MY-DOMAIN> <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">dn: cn=Manager,dc=<MY-DOMAIN>,dc=<COM> <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">objectclass: organizationalRole <o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">cn: Manager<o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">保存?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">ldif</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">后缀的文件。然后我们用命o把这些信息加?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">ldap</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中去Q?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <tt> <span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 黑体">ldapadd -x -D "cn=Manager,dc=<MY-DOMAIN>,dc=<COM>" -W -f example.ldif<o:p></o:p></span> </tt> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <tt> <span style="FONT-SIZE: 10pt; FONT-FAMILY: 黑体">让我们来查看以下我们的设|是否出现问题:<span lang="EN-US"><o:p></o:p></span></span> </tt> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">ldapsearch -x -b 'dc=example,dc=com' '(objectclass=*)'<o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上面的是</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">linux/unix</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的命oQ?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">windows</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下我们需要做Ҏ改:</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span lang="EN-US" style="FONT-STYLE: normal">ldapsearch -x -b dc=example,dc=com (objectclass=*)<o:p></o:p></span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对,是L引号?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 60pt"> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Z察看方便Q笔者徏议?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">GUI</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具来查看,比如W者用的</span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal">Softerra LDAP Browser 2.6</span> </em> <em> <span style="FONT-STYLE: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span> </em> <em> <span lang="EN-US" style="FONT-STYLE: normal"> <o:p> </o:p> </span> </em> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span lang="EN-US"> <o:p></o:p></span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l4 level1 lfo1; tab-stops: list 42.0pt"> <span lang="EN-US" style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">三?/span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span> <span lang="EN-US">java</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集成</span> <span lang="EN-US"> <br /> </span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们?/span> <span lang="EN-US">ldap Server</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">已经搭徏h了,我们需要在我们?/span> <span lang="EN-US">java</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">E序中访问这个服务?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span lang="EN-US">Openldap.org</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上有没有Ԍ有讲Q下面介l的</span> <span lang="EN-US">JLDAP</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是q这个的?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们需要看一下?/span> <span lang="EN-US">Java LDAP Overview</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">”里面的内容。内容不是很多,但很实用?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要在</span> <span lang="EN-US">java</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中访?/span> <span lang="EN-US">ldap</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q我们需要一?/span> <span lang="EN-US">api,</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你可以在下面的网站上获得Q?/span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span lang="EN-US"> <a >http://developer.novell.com/wiki/index.php/LDAP_Classes_for_Java</a> </span> </p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt"> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在下在的文g里面有许多的例子Q在</span> <span lang="EN-US">novell</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的网站上也有很多的例子。我׃讲了?/span> <span lang="EN-US">Try yourself</span> <span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/span> </p> <img src ="http://www.tkk7.com/huabingl/aggbug/65886.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/huabingl/" target="_blank">binge</a> 2006-08-26 08:37 <a href="http://www.tkk7.com/huabingl/archive/2006/08/26/65886.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PicoContainer源码Dhttp://www.tkk7.com/huabingl/archive/2006/07/23/59646.htmlbingebingeSun, 23 Jul 2006 06:30:00 GMThttp://www.tkk7.com/huabingl/archive/2006/07/23/59646.htmlhttp://www.tkk7.com/huabingl/comments/59646.htmlhttp://www.tkk7.com/huabingl/archive/2006/07/23/59646.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/59646.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/59646.html阅读全文

binge 2006-07-23 14:30 发表评论
]]>
关于GWT的第一手经?/title><link>http://www.tkk7.com/huabingl/archive/2006/07/08/57250.html</link><dc:creator>binge</dc:creator><author>binge</author><pubDate>Sat, 08 Jul 2006 05:47:00 GMT</pubDate><guid>http://www.tkk7.com/huabingl/archive/2006/07/08/57250.html</guid><wfw:comment>http://www.tkk7.com/huabingl/comments/57250.html</wfw:comment><comments>http://www.tkk7.com/huabingl/archive/2006/07/08/57250.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/huabingl/comments/commentRss/57250.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/huabingl/services/trackbacks/57250.html</trackback:ping><description><![CDATA[ <p>译者安Q你敢大胆采用最新的技术吗Q你虑哪些斚wQ下面的采访给我们提供一个参考?br /> 原文Q?a class="permalink" >Interview: Real-world Experience with Google Web Toolkit (GWT)</a><br />     在java中,Ҏ术的采用是一件让人心烦的事情Q因为我们获得通知的途径太多。不同的会议Q不同的站点如slashdot和theserverside,而且q有C清的个h博客如dhh和o'Reilly's Radar.<br />一个让人感兴趣的技术L让业界议论纷UP正如Z所意识到的Q这个品ƈ不是成熟期?br />    Z让一个品成Z,早期的采用者必够喜Ƣ这品来承担很多非常的Q务以?br />让更怯的开发者相信这Ҏ技术值得采用。像Hibernate和Spring Frameworkq样的技术花了好几年<br />才成Z个成熟品。许多品,比如maven,在版本确定之前经历了痛苦的时期因Z们早期缺?br />_的文档或者有不同的够强大的挑战者比如ant.本h对这个过E中的盲点很感兴,从议个品的介绍到大范围的采用往往要经历成月上q_而且很难指定旉表。hibernateq不是暴雨似的到?而是通过大量用户自我采用.一个失败的目比如ojb出来的时候也是引赯?但是它最l没有承诺的那么?在这U情况下,早期的hibernate使用者其实信心不?<br />  让我们来看Google Web Toolkit (GWT)?br /><font color="#ff1493">GWT在这个进E中处于什么位|?</font><br />gwt看v来是在早期用(early-adopterQ的中期。一开始的议论声已l消去,现在陆箋出现了许多关于gwt的文章和博客Q表明了Z正在期待关于gwt的第一个helloworld的反馈报告。我的很多}慎的同行都在回避他,事实上认为它是个不好的主意。风险阻了开发者对大多数新技术的评估直到他们在现实中看到了一个活生生的实例解x?-像maven被ibm使用一栗那些有能力来尝试风险的开发者正在对q个框架q行试。他们中的某一个或许宣Ugwt不适合它的l织。另外一个同行已l原则上接受了gwt的观点,但是没有旉来在他的应用中集成。所以,到底gwt处于什么时期?早期的用h有哪些l验呢?<br />   关于q个问题Q我专门采访了Grassroots Technologies公司的Michael Podrazik。Grassroots Technologies是一个在U约的咨询小l。通过在Grassroots的工作,michael已经正在把gwt应用在他们的一个新的正在开发的web应用当中。在下面的采讉K面,我要求他来交他的品经验来帮助其他人去理解gwt.我特别要求他l一些gwt客观的意?而且l致的描qC在用gwt开发过E中遇到的挑战。幸q的是,他的信息会帮助你决定是否gwt是你目的正选择?br /><font color="#ff1493">采访内容Q?/font><br />q:什么你选择了gwt?<br />a:我订阅了google的blog,所以我听说了gwt当他发布到javaone的时候。在阅读了他的文档之后我开始对q种方式很好奇,因此我把它down了下来而且开始用它(play with it).我刚刚开始了一个项目,q个目是把遗留?Access/VBA的桌面应用升Uؓ一个web应用。在UI斚w有许多ajaxianҎ所以我x可以让gwt一展n手。我认ؓQfigureQ只要我保持我的架构_抽象Q我有能力用更Zl的web应用框架来替换gwt层。gwt会很伤脑{吗Q至目前ؓ止我很开心?br />q:gwt出现了那些挑战?你围l着gwt设计的web框架吗?gwt是否挑战了你关于web应用开发的观点Q?br />a:你确实不能简单的认ؓgwt是一个webapp的框Ӟ他更是一个有着rpc和对象序列化的uicd。因Z需要改变你目l织的assumptions以及包的l构。在java服务端开发rich-client用户界面我们有大量的l验Q比如flash/actionscript.gwt和他们十分类|因此可以惌有这些元素的目--分隔的服务端和客L而不是同一的webapp--很爽?br />  朝着q个方向Q你需要明区分服务端和客L的功能。我怿一个好的哲学就是你的客户端仅仅用于展C?br />  你需要思考你服务接口的设计,比如每个操作的粒?br />  你不能在客户端代码上用java5得语?br />Q:你的意思是不能再gwt的具体类或者普通的web应用里面用java5的语法?<br />a:你不能在客户代码里面使用java5的语法。我们在服务端代码中使用了许多java5的特性,但是所有将要被转换成javascript的代码必L1.4的规范?br />q个也包括许多事实上你用在服务端的类。因为rpc框架允许用户定义的数据类型的序列化,意思是你将在浏览器端得C个已l被转化为javascript实例的类Q这个类作ؓ一个参C递到服务端的实现中。在你的服务端代码中Q你操U同一个class而且是编译过的字节码?br /> q个时候就出现了一个选择Qdomain module和gwt的耦合度怎样才合适呢Q?br />What we decided was to keep value objects implementation-agnostic so as to avoid “infecting?the API and persistence layers with beans implementing GWT’s IsSerializable interface.<br />举个例子Q在服务端我们有个IUser接口的用h块,q个借口l承自IPersistable.gwt的实现接受和q回实现IsSerializable接口的GwtUser的实例ƈ把这些实例利用commons-beanutils发送到服务端?br /> 对于q一点可能有些争论,q样做ƈ不非必要。但是我觉得q点额外的工作将带给你更为清晰的层次划分。我们可以嵌入gwtCQ何一点,而且可以转换到springmvc或者struct或者其他的地方Q而不需要担心代码上 的反应?br />q:你发现gwt产生的javascript不能垮浏览器的地方了吗?你发现gwt产生的javascript包含一些错误需要手动调试了吗?<br />a:都没有,q正是o我们惊讶的地斏V跨览器javascript的开发是PITAQ而且GWT真正的把你从他那里隔d来?br />我发C大量的在FIREFOX和IE不同的地方,但是q些最后被认都是CSS支持的问题而于GWT无关?br />我也遇到了一大队JAVASCRIPT错误Q但是这些错误都是应为变量而不在初始化Q这些问题很快就会找到ƈ且不需要大量的调试。目前已l完成的大多数工作ƈ不全是ui控g的问题,或许随着我们的深入,我们会遇C些问题,但是目前为止Q我们还没有多少ȝ?br />q:你的工作l的成员是更喜欢javaq是javascript呢?<br />昄是java,哈哈。但是我们有人对javascript和actionscript也很_N。就像译者本人?br />q:一句话Q对正在考虑gwt的hQ你有什么徏议?你会推荐他吗Q你对这Ҏ术的客观观点是什么?thumbs up or thumbs down?<br />a:目前是thumbs up.我们目前仍然在开发的早期Q而且我还不想说在它是完美的或者在以后的进E中不会咬我们一口。意思是_你的建构要搭好?它真的像是在作swing或者其他UI的桌面应用?br /> 我们用基于Controller和IView实现的GWT生成了全部的ui.除了gwt模块引入以外Q那里没有html?br />  q是对几乎所有主web应用范例的违背,但是如果你喜Ƣui~程Q他完美的抽象了ajax/dhtml的行为到一个十分友好和可扩展的api.<br />  我或怼说如果你的工作是php,asp或者其他语aQ你或许需要花更多的功夫。如果你已经是一个有l验的javaE序员,那么你可以很快投入其中?br /></p> <img src ="http://www.tkk7.com/huabingl/aggbug/57250.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/huabingl/" target="_blank">binge</a> 2006-07-08 13:47 <a href="http://www.tkk7.com/huabingl/archive/2006/07/08/57250.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>log4j配置概要http://www.tkk7.com/huabingl/archive/2006/07/04/56471.htmlbingebingeTue, 04 Jul 2006 02:07:00 GMThttp://www.tkk7.com/huabingl/archive/2006/07/04/56471.htmlhttp://www.tkk7.com/huabingl/comments/56471.htmlhttp://www.tkk7.com/huabingl/archive/2006/07/04/56471.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/56471.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/56471.html http://logging.apache.org/log4j/docs/index.html

一个中文翻译的文档:

http://www.jaxwiki.org/zh/project/logging.apache.org/log4j/docs/manual.html


我摘出黄色字体表明几条列在下?也是W者认为log4j最主要特点的浓~?

1.阶层式的命名:

      如果一个logger 的名字后面跟着一个点PdotQ,它就是点PdotQ后面的那个logger的前辈( ancestorQ,是这个晚辈(descendantQ?的前~。如果在它自己和q个晚辈之间没有其它的前辈,它和q个晚辈之间是?/em>?/em>关系?/font>

2.U别l承

   对于一个给定的logger CQ它l承的?/em>{于logger阶层里,从C开始往root logger上去的第一个non-nullU别?/font>


3.执行规则

   在一个别ؓqQ被指定的或l承的)的logger里,一个别ؓp的日志请求,只有?em>p >= q 时才能够被执行?/font>

4.appenderd性的规则

Logger C的log输出信息被输出到C的所有appenders和它的前辈的 appenders。这是"appender additivity"的意思?/font>但是Q如果logger C的前辈,比如说PQP的additivity flag被设|ؓ falseQ那么,C的输Z息将被输出到C的所有appenders中去Q以及它的前辈的——截止在P那里Q包括P在内的,appenders中去Q但是不会输出到P的前辈的 appenders中去?默认情况下,Loggers的additivity flag讄?code>true?/font>

关于日志格式:暂脓几个样例:
log4j.appender.A1.layout.ConversionPattern=%d %-5p [%t] %-c (%13F:%L) %3x - %m%n

在配|文件中Qlog4j可以讉K到系l环境变量。具体的变量参考相兌料?br /> 一我很早以前在csdn写的文章:
http://blog.csdn.net/huabingl/archive/2005/02/19/293933.aspx



binge 2006-07-04 10:07 发表评论
]]>
XMLBeanshttp://www.tkk7.com/huabingl/archive/2006/06/21/54215.htmlbingebingeWed, 21 Jun 2006 05:50:00 GMThttp://www.tkk7.com/huabingl/archive/2006/06/21/54215.htmlhttp://www.tkk7.com/huabingl/comments/54215.htmlhttp://www.tkk7.com/huabingl/archive/2006/06/21/54215.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/54215.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/54215.html  XmlBeans?BEA公司发明Q后捐赠lApache基金会的?br /> 在项目中遇到q样的需求,Ҏ已有的schema对xmlq行格式校验Qƈd出xml得数据?br /> 在大搜一番后Q我最l把目光停留在xmlbeans上面。被淘汰的是digester.
 下面是一dev2dev得文章:
  http://dev2dev.bea.com/pub/a/2006/05/xmlbeans-2.html?page=4
 我就不炒饭了?br /> 好心的hl简单翻译了一下:
http://dev2dev.bea.com.cn/techdoc/200403127.html
 译得内容很,有空本h补上?br />ibm dw上也有个豆腐块:
http://www-128.ibm.com/developerworks/cn/xml/x-beans1/
关于digester的内容,只选了一文章:来自devx?br />http://www.devx.com/Java/Article/21832/1763

关于2中方法的ҎQ他们的文章已经说的很详l了?br />
xmlbeans采用的是sax来读取数据?004q_由bea公司发明的stax(stream API for XML)已经被jcp列ؓ标准jsr-173,在jdk6.0中会出现?br /> 
关于stax,sax和dom的对比超出本范_在此略过?br />后记:
  在正在完成的目?我采用了xmlbeans,它的引入l我带来了很大的方便.


binge 2006-06-21 13:50 发表评论
]]>
Commons Configurationhttp://www.tkk7.com/huabingl/archive/2006/05/31/49191.htmlbingebingeWed, 31 May 2006 02:30:00 GMThttp://www.tkk7.com/huabingl/archive/2006/05/31/49191.htmlhttp://www.tkk7.com/huabingl/comments/49191.htmlhttp://www.tkk7.com/huabingl/archive/2006/05/31/49191.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/49191.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/49191.html阅读全文

binge 2006-05-31 10:30 发表评论
]]>
proxoolhttp://www.tkk7.com/huabingl/archive/2006/05/24/47900.htmlbingebingeWed, 24 May 2006 14:19:00 GMThttp://www.tkk7.com/huabingl/archive/2006/05/24/47900.htmlhttp://www.tkk7.com/huabingl/comments/47900.htmlhttp://www.tkk7.com/huabingl/archive/2006/05/24/47900.html#Feedback0http://www.tkk7.com/huabingl/comments/commentRss/47900.htmlhttp://www.tkk7.com/huabingl/services/trackbacks/47900.html
http://proxool.sourceforge.net/

 Setting up Proxool in a Servlet environment(在servlet环境中用proxool)
   Configuration(配置)
   ?U方式来配置proxoolQ?br />      1. XML file?br />      代理?JAXPConfigurator来处理xml文g。如果文件不是绝对\径,会定位到应用的根目录?br /><servlet>
  <servlet-name>ServletConfigurator</servlet-name>
  <servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>
  <init-param>
    <param-name>xmlFile</param-name>
    <param-value>WEB-INF/proxool.xml</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet> 
   2. Property file?br /> 代理到PropertyConfigurator去解析。如果文件不是绝对\径,会定位到应用的根目录?br />   <servlet>
  <servlet-name>ServletConfigurator</servlet-name>
  <servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>
  <init-param>
    <param-name>propertyFile</param-name>
    <param-value>WEB-INF/proxool.properties</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>
3. Init parameters?br />   代理到PropertyConfigurator去解析。根据servlet的初始化参数创徏一个Property对象?br /><servlet>
  <servlet-name>ServletConfigurator</servlet-name>
  <servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>
  <init-param>
    <param-name>jdbc-0.proxool.alias</param-name>
    <param-value>test</param-value>
  </init-param>
  <init-param>
    <param-name>jdbc-0.proxool.driver-url</param-name>
    <param-value>jdbc:hsqldb:.</param-value>
  </init-param>
  <init-param>
    <param-name>jdbc-0.proxool.driver-class</param-name>
    <param-value>org.hsqldb.jdbcDriver</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>
在刈除所有的q接池后QServletConfigurator会自动停止?br /> <servlet>
  <servlet-name>ServletConfigurator</servlet-name>
  <servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class>
  <init-param>
    <param-name>autoShutdown</param-name>
    <param-value>false</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>
Installation.Q安装)
   如果在你的servlet环境中有多个web应用Q你需要考虑如何来安装proxool.q里?U方案:
   1。在你应用的库目录(web-info/libQ?他的理论如下Q?br />   proxool不会再web应用间共享。如果你重新装在web应用Q一个新的实例将会生。除非你昑ּ关闭旧的proxoolQ否则他l用各U资源(本地资源和数据库Q。你可以用如下的办法来关闭他们:用上面提到的ServletConfigurator或者调用ProxoolFacade的shutdownҎ?br />   2。在容器的公用目录下或者classpath中,他的理论如下Q?br />   你可以在多个web应用中共享proxool,q样的话Q如果你重新装在单个的web应用Qproxool依然在运行。如果你惛_起proxool,要么重v容器Q要么全部应用停止ƈ重新配置proxool.
----------------------
本h在CSDN上的部分译:
http://blog.csdn.net/huabingl/archive/2006/05/11/725155.aspx

binge 2006-05-24 22:19 发表评论
]]>
վ֩ģ壺 aƬ߹ۿ| һƵ | һëƬѲֱۿ| ձ˻ʿxxxxƵ| Ұһ| yyƵ| ޾Ʒ| 6080ҹһëƬѿ6080ҹ| þúݺݸ߳޾Ʒ| 99ƵоƷƵѹۿ| 91޾Ʒһۺϲ| ѹۿ㶮| ޹Ʒ˾ƷС˵| ԻƵ30ӳ| һ| СƵ| Ƶѹۿվ| ĻͼƬ| ѿƵվ| ɫ͵͵av˵| ˵Ƶ߹ۿ| ۺavһ| ׾Ʒһ | ëƬav߲һ| ˳ɵӰ߹ۿ| ޾Ʒ| 91߲| ޾Ʒ߳ˮAƬ| ҰƵۿ| 2022ѹƷ| þþƷۺ| ӰԺ߹ۿ| ֱƵ| ޻ɫַȫ| ڵƷƵ| ձ岻aվ| 1234| ۺҹ | ձvaҹĻþ| Ƭ쿴| ޾Ʒҹר|