??xml version="1.0" encoding="utf-8" standalone="yes"?>一区二区三区日韩,九色porny丨国产精品,久久精品aaaaaa毛片http://www.aygfsteel.com/bibi/category/4657.html<font size=2>W鸟后飞Q天IZ有我膀划过的痕q!<br>x世界Q真情h生,扫描人间百态!<br>My contact: o_olle_e@hotmail.com</font> zh-cnSat, 31 May 2008 11:14:00 GMTSat, 31 May 2008 11:14:00 GMT60Tips for developmenthttp://www.aygfsteel.com/bibi/archive/2008/04/21/194571.htmlg?/dc:creator>g?/author>Mon, 21 Apr 2008 10:03:00 GMThttp://www.aygfsteel.com/bibi/archive/2008/04/21/194571.htmlhttp://www.aygfsteel.com/bibi/comments/194571.htmlhttp://www.aygfsteel.com/bibi/archive/2008/04/21/194571.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/194571.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/194571.html
1)UnabletoreadTLD"META-INF/c.tld"fromJAR
DeleteServlet.jarandjsp.jarfromWEB-INF/lib.

2)AntTips:

a)<classpath>
<pathelementpath="${classpath}"/>
<pathelementlocation="lib/helper.jar"/>

</classpath>
b)<classpath>
      <
pathelementpath="${classpath}"/ > 方式 ?/span> Q引用特定的变量

      < filesetdir="lib" > 方式 ?/span> Q指向特定的文g?/span>
           <includename="**/*.jar"/>
      </fileset>

           < pathelementlocation="classes"/ > 方式 ?/span> Q指向单个目?/span>

      < dirsetdir="${build.dir}" > 方式 ?/span> Q指向特定目录集
           <includename="apps/**/classes"/>
           <excludename="apps/**/*Test*"/>
      </dirset>

      < filelistrefid="third-party_jars"/ > 方式 ?/span> Q引用指定文件列?/span>
</classpath>
c) <copy todir="${web.inf.classes}">
  <fileset dir="src/resources">
   <include name="**/spring/*.xml" />
   <include name="**/xfire/*.xml" />
  </fileset>
  <fileset dir="src/main">
   <include name="**/*.xml" />
  </fileset>
 </copy>


3)Failed to setup clustering", what does it mean?


 
[JBossCacheService][main] jboss.cache:service=TomcatClusteringCache service to Tomcat clustering not found

  [JBossCacheManager][main] JBossCacheService to Tomcat clustering not found

  [TomcatDeployer][main] Failed to setup clustering, clustering disabled

There's two possibilities here:

1) Since 3.2.6, HTTP session replication is based on JBossCache, and more precisely the TomcatClusteringCache service.In 3.2.6, 3.2.7, 4.0.1 and 4.0.1SP1, the dependency on this service is missing in Tomcat's jboss-service.xml. To fix it, please edit /all/deploy/jbossweb-tomcat5x.sar/META-INF/jboss-service.xml and enable the <depends optional-attribute-name="CacheName?"> element, update the MBean ObjectName as well as the <depends> element itself.

The resulting code should look as follows:

      <!--

         Configuration for HTTP Session Clustering using JBossCache

      -->

      <depends>jboss.cache:service=TomcatClusteringCache</depends>

instead of

      <!--

         Configuration for HTTP Session Clustering using JBossCache

      -->

      <!--

      <depends optional-attribute-name="CacheName">jboss.cache:service=TreeCache</depends>

      -->

2) This error could also come up if you're trying to remove the clustering capabilities from the all configuration as explained in JBossASTuningSliming. Even though you might have modified jbossweb-tomcat5x.sar/META-INF/jboss-service.xml to remove the dependency on

jboss.cache:service=TomcatClusteringCache

, if the web application is deployed as

<distributable/>

, AS will try starting up

jboss.cache:service=TomcatClusteringCache

, for HTTP session replication. In this case, the ERROR message should not be considered as a failure because if it can't start it up, it'll log the ERROR but will continue working as normal.

4) 一ơ性导出所有oracle sequence

select 'create sequence ABEL.'|| SEQUENCE_NAME || ' minvalue '||MIN_VALUE||' maxvalue '||MAX_VALUE||' start with '||LAST_NUMBER||' increment by '||INCREMENT_BY||' cache '||CACHE_SIZE||' ;' from dba_sequences where SEQUENCE_OWNER = 'TEEMA'

5) Ora-01033: Oracle initialization or shutdown in process.


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\Database\oracle\product\10.1.0\Db_1)
(PROGRAM = extproc)
)
#(SID_DESC =
# (GLOBAL_DBNAME = Abel)
# (ORACLE_HOME = D:\Database\oracle\product\10.1.0\Db_1)
# (SID_NAME = Abel)
#)
)


]]>
关于opencms把sites目录中的文gҎURL昄到网늚解决Ҏhttp://www.aygfsteel.com/bibi/archive/2006/08/11/62966.htmlg?/dc:creator>g?/author>Fri, 11 Aug 2006 04:59:00 GMThttp://www.aygfsteel.com/bibi/archive/2006/08/11/62966.htmlhttp://www.aygfsteel.com/bibi/comments/62966.htmlhttp://www.aygfsteel.com/bibi/archive/2006/08/11/62966.html#Feedback1http://www.aygfsteel.com/bibi/comments/commentRss/62966.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/62966.html阅读全文

]]>
opencms开发常见问题,Ƣ迎大家补充http://www.aygfsteel.com/bibi/archive/2006/08/08/62358.htmlg?/dc:creator>g?/author>Tue, 08 Aug 2006 07:07:00 GMThttp://www.aygfsteel.com/bibi/archive/2006/08/08/62358.htmlhttp://www.aygfsteel.com/bibi/comments/62358.htmlhttp://www.aygfsteel.com/bibi/archive/2006/08/08/62358.html#Feedback7http://www.aygfsteel.com/bibi/comments/commentRss/62358.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/62358.html阅读全文

]]>
水晶报表pd文章 -- 用Swing方式昄报表http://www.aygfsteel.com/bibi/archive/2005/12/24/25289.htmlg?/dc:creator>g?/author>Sat, 24 Dec 2005 03:00:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/12/24/25289.htmlhttp://www.aygfsteel.com/bibi/comments/25289.htmlhttp://www.aygfsteel.com/bibi/archive/2005/12/24/25289.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/25289.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/25289.html阅读全文

]]>
如何把awt或者swing的UI生成一个图形文?/title><link>http://www.aygfsteel.com/bibi/archive/2005/12/20/24822.html</link><dc:creator>g?/dc:creator><author>g?/author><pubDate>Tue, 20 Dec 2005 09:16:00 GMT</pubDate><guid>http://www.aygfsteel.com/bibi/archive/2005/12/20/24822.html</guid><wfw:comment>http://www.aygfsteel.com/bibi/comments/24822.html</wfw:comment><comments>http://www.aygfsteel.com/bibi/archive/2005/12/20/24822.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/bibi/comments/commentRss/24822.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/bibi/services/trackbacks/24822.html</trackback:ping><description><![CDATA[     摘要:   <a href='http://www.aygfsteel.com/bibi/archive/2005/12/20/24822.html'>阅读全文</a><img src ="http://www.aygfsteel.com/bibi/aggbug/24822.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/bibi/" target="_blank">g?/a> 2005-12-20 17:16 <a href="http://www.aygfsteel.com/bibi/archive/2005/12/20/24822.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Rule Of Developmenthttp://www.aygfsteel.com/bibi/archive/2005/12/20/24819.htmlg?/dc:creator>g?/author>Tue, 20 Dec 2005 09:07:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/12/20/24819.htmlhttp://www.aygfsteel.com/bibi/comments/24819.htmlhttp://www.aygfsteel.com/bibi/archive/2005/12/20/24819.html#Feedback7http://www.aygfsteel.com/bibi/comments/commentRss/24819.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/24819.html阅读全文

]]>
cocoonpd——开发一个简单的Web程http://www.aygfsteel.com/bibi/archive/2005/12/14/23927.htmlg?/dc:creator>g?/author>Wed, 14 Dec 2005 10:53:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/12/14/23927.htmlhttp://www.aygfsteel.com/bibi/comments/23927.htmlhttp://www.aygfsteel.com/bibi/archive/2005/12/14/23927.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/23927.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/23927.html阅读全文

]]>
cocoonpd —?XML Server PagesQXSPQ?W记http://www.aygfsteel.com/bibi/archive/2005/12/08/23025.htmlg?/dc:creator>g?/author>Thu, 08 Dec 2005 12:08:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/12/08/23025.htmlhttp://www.aygfsteel.com/bibi/comments/23025.htmlhttp://www.aygfsteel.com/bibi/archive/2005/12/08/23025.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/23025.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/23025.html阅读全文

]]>
水晶报表pd文章--优化{略W记http://www.aygfsteel.com/bibi/archive/2005/12/07/22919.htmlg?/dc:creator>g?/author>Wed, 07 Dec 2005 14:02:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/12/07/22919.htmlhttp://www.aygfsteel.com/bibi/comments/22919.htmlhttp://www.aygfsteel.com/bibi/archive/2005/12/07/22919.html#Feedback1http://www.aygfsteel.com/bibi/comments/commentRss/22919.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/22919.html阅读全文

]]>
水晶报表pd文章--FAQhttp://www.aygfsteel.com/bibi/archive/2005/12/07/22888.htmlg?/dc:creator>g?/author>Wed, 07 Dec 2005 08:57:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/12/07/22888.htmlhttp://www.aygfsteel.com/bibi/comments/22888.htmlhttp://www.aygfsteel.com/bibi/archive/2005/12/07/22888.html#Feedback2http://www.aygfsteel.com/bibi/comments/commentRss/22888.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/22888.html阅读全文

]]>
格式化Q意的旉格式http://www.aygfsteel.com/bibi/archive/2005/11/28/21693.htmlg?/dc:creator>g?/author>Mon, 28 Nov 2005 09:08:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/28/21693.htmlhttp://www.aygfsteel.com/bibi/comments/21693.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/28/21693.html#Feedback4http://www.aygfsteel.com/bibi/comments/commentRss/21693.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/21693.html阅读全文

]]>
GOOGLE挑战赛练习题3及答?1000? http://www.aygfsteel.com/bibi/archive/2005/11/28/21624.htmlg?/dc:creator>g?/author>Mon, 28 Nov 2005 02:38:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/28/21624.htmlhttp://www.aygfsteel.com/bibi/comments/21624.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/28/21624.html#Feedback4http://www.aygfsteel.com/bibi/comments/commentRss/21624.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/21624.html阅读全文

]]>
GOOGLE挑战赛练习题2及答?500?http://www.aygfsteel.com/bibi/archive/2005/11/28/21623.htmlg?/dc:creator>g?/author>Mon, 28 Nov 2005 02:36:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/28/21623.htmlhttp://www.aygfsteel.com/bibi/comments/21623.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/28/21623.html#Feedback2http://www.aygfsteel.com/bibi/comments/commentRss/21623.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/21623.html阅读全文

]]>
GOOGLE挑战赛练习题1及答?200?http://www.aygfsteel.com/bibi/archive/2005/11/28/21620.htmlg?/dc:creator>g?/author>Mon, 28 Nov 2005 02:32:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/28/21620.htmlhttp://www.aygfsteel.com/bibi/comments/21620.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/28/21620.html#Feedback2http://www.aygfsteel.com/bibi/comments/commentRss/21620.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/21620.html阅读全文

]]>
Cocoon学习W记 -- 基础?/title><link>http://www.aygfsteel.com/bibi/archive/2005/11/12/19460.html</link><dc:creator>g?/dc:creator><author>g?/author><pubDate>Sat, 12 Nov 2005 05:47:00 GMT</pubDate><guid>http://www.aygfsteel.com/bibi/archive/2005/11/12/19460.html</guid><wfw:comment>http://www.aygfsteel.com/bibi/comments/19460.html</wfw:comment><comments>http://www.aygfsteel.com/bibi/archive/2005/11/12/19460.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/bibi/comments/commentRss/19460.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/bibi/services/trackbacks/19460.html</trackback:ping><description><![CDATA[<H1 style="MARGIN: 17pt 0cm 16.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一、什么是</SPAN><SPAN lang=EN-US>cocoon</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><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></H1> <P style="TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体">Cocoon 是一U?Java 服务器框Ӟ它允怋?XSLTQXML 样式表语a转换 (XML Stylesheet Language-Transformation)Q{换动态发?XML 内容。通过依靠 XML 描述内容以及使用 XSLT 内容{换成多种格式QCocoon 提供了用于构建内宏V逻辑和表C在很大E度上彼此分ȝ应用E序的^台?<o:p></o:p></SPAN></P> <P style="LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体">Cocoon 使用道的概忉|描述内容发布到 Web 的过E。管道由一些输入数据以及随后对它进行的一些处理步骤构成。每个处理步骤接受前一步的输出作ؓ输入Q一直到辄道的末端q生最l输出。它包含各种各样的可重用lgQ这些组件可以配|成使用最低限度的 Java 开发生成复杂的行ؓ。例如,通过单独使用 XML ?XSLTQCocoon 可用于:<o:p></o:p></SPAN></P> <UL type=disc> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">提供静态文件和动态生成的响应<SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">使用L数量的处理将用户h透明地映到物理资源<SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">执行单和多<SPAN lang=EN-US> XSLT 转换 <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">参数动态传递到<SPAN lang=EN-US> XSLT 变换 <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list 36.0pt"><SPAN style="COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生成各种各样的输出格式,包括</SPAN><SPAN lang=EN-US style="COLOR: windowtext"> XML</SPAN><SPAN style="COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: windowtext">HTML</SPAN><SPAN style="COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: windowtext">PNG</SPAN><SPAN style="COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: windowtext">JPEG</SPAN><SPAN style="COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: windowtext">SVG </SPAN><SPAN style="COLOR: windowtext; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: windowtext"> PDF </SPAN><B><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"><o:p></o:p></SPAN></B></LI></UL> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><STRONG><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"> <o:p></o:p></SPAN></STRONG></P> <H1 style="MARGIN: 17pt 0cm 16.5pt"><STRONG><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二?/SPAN></STRONG><STRONG><SPAN lang=EN-US style="FONT-SIZE: 15pt; mso-bidi-font-size: 13.5pt">Cocoon 2 </SPAN></STRONG><STRONG><SPAN style="FONT-SIZE: 15pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 13.5pt">体系l构的原?/SPAN></STRONG><STRONG><SPAN lang=EN-US style="FONT-SIZE: 15pt; mso-bidi-font-size: 13.5pt"><o:p></o:p></SPAN></STRONG></H1> <P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">首先Q处?SPAN lang=EN-US> XML 文可分成几个离散的步骤。这些步骤的l合描述处理<I>道</I>。管道由输入、某些处理以及输出构成。Cocoon 2 使用 SAX 事g作ؓ每个处理步骤之间的连接?BR>W二Q可以用特D类型的lg来对道中的每个阶段建模。例如,用生成器生成输入Q用序列化器生成输出?BR>W三Q对用户h的响应包括确定ؓhQ与其输入一P服务的正管道,然后指示道执行其处理以生成l用L响应?<o:p></o:p></SPAN></SPAN></P> <H2 style="MARGIN: 13pt 0cm"><FONT face=宋体><SPAN lang=EN-US>2.1</SPAN><STRONG><SPAN style="FONT-SIZE: 12pt; mso-bidi-font-size: 13.5pt">道lg</SPAN></STRONG><SPAN lang=EN-US style="mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></FONT></H2> <P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">Cocoon 包含许多常规道lgQ可以用有用的方法将它们q接h。根据这些组件在道中扮演的角色Q可以将它们分组成几U完全不同的cd?o:p></o:p></SPAN></P> <UL type=disc> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">道输入 ?生成器和阅读?SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">处理步骤 ?转换器和操作<SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">道输出 ?序列化器<SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">条g的处??匚w器和选择?SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI></UL> <P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">Cocoon 道通常臛_q成器和序列化器组成,但可能含有Q意数量的处理步骤。将数据作ؓ SAX 事g通过 Cocoon 道传递?<o:p></o:p></SPAN></P> <H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US>2.1.1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">输入</SPAN><SPAN lang=EN-US>-</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生成器和阅读?/SPAN><SPAN lang=EN-US style="COLOR: black">:<o:p></o:p></SPAN></FONT></H3> <P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><I><SPAN style="COLOR: black; FONT-FAMILY: 宋体">生成?/SPAN></I><SPAN style="COLOR: black; FONT-FAMILY: 宋体">负责d数据源(例如Q文ӞQ然后将该数据作Zpd<SPAN lang=EN-US> SAX 事g传递到道。因此,最单的生成器是 SAX 解析器。通常QQ何可以被映像成一pd SAX 事g的数据源都可以成为生成器的基?<BR>?Cocoon 中有许多可用的生成器。最有用的是Q?o:p></o:p></SPAN></SPAN></P> <UL type=disc> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo3; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">FileGeneratorQ从文gpȝ?Web d XML 文g <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo3; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">HTMLGenerator: 从文件系l或 Web d HTML 文g <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo3; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">DirectoryGeneratorQ读取文件系l以提供目录清单 <o:p></o:p></SPAN></LI></UL> <P style="MARGIN: 0cm 0cm 12pt; LINE-HEIGHT: 150%"><I><SPAN style="COLOR: black; FONT-FAMILY: 宋体">阅读?/SPAN></I><SPAN style="COLOR: black; FONT-FAMILY: 宋体">?SPAN lang=EN-US> Cocoon 道模型中的特例Q因为它们不是理?XML 的组件。阅d只是讉K外部资源Q然后将它直接复制到响应。通常使用它们来提供静态文Ӟ例如Q图像或 CSS 样式表)。可以将阅读器视包含的管道;它们生成输入数据Q然后将数据序列化成响应?o:p></o:p></SPAN></SPAN></P> <H3 style="MARGIN: 13pt 0cm"><FONT size=5><STRONG><SPAN lang=EN-US style="FONT-WEIGHT: normal">2.1.2</SPAN></STRONG><STRONG><SPAN style="FONT-WEIGHT: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">处理</SPAN></STRONG><STRONG><SPAN lang=EN-US style="FONT-WEIGHT: normal">-</SPAN></STRONG><STRONG><SPAN style="FONT-WEIGHT: normal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">转换器和操作</SPAN></STRONG><STRONG><SPAN lang=EN-US style="FONT-WEIGHT: normal"><o:p></o:p></SPAN></STRONG></FONT></H3> <P style="MARGIN: 0cm 0cm 12pt; LINE-HEIGHT: 150%"><I><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体">    转换?/SPAN></I><SPAN style="COLOR: black; FONT-FAMILY: 宋体">?SPAN lang=EN-US> Cocoon 道中的主要处理步骤。它们接?SAX 事g作ؓ输入Q执行一些有用的处理Q然后将l果作ؓ SAX 事g传入道。一U查看{换器的有用方法是作ؓ?SAX 事g通过它时修改 SAX 事g的lg。在q一点上Q它们类g SAX qo器?<BR>    使用最q泛的{换器?XSLT 转换器。它其输入传递到执行 XSLT 转换?XSLT 处理器中。然后将转换的结果作?SAX 事g反馈到管道?<BR><I>    操作</I>是将附加动态行为插入管道的一U方法,q且通常为特D应用程序定制。但是,某些一般的操作?Cocoon 捆在一P例如Q执行数据库交互Q表单验证和发送邮件等。操作的成功完成q会影响是否执行后箋处理步骤?o:p></o:p></SPAN></SPAN></P> <H3 style="MARGIN: 13pt 0cm"><SPAN lang=EN-US><FONT size=5>2.1.3 </FONT></SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 16.0pt">输出Q序列化?/SPAN><I><SPAN lang=EN-US style="COLOR: black; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></I></H3> <P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><I><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">    序列化器</SPAN></I><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">?SPAN lang=EN-US> Cocoon 道中的端点。它们负责接收直接从生成器(在可能最短的道中)或者以前的处理步骤Q例如{换器Q生的 SAX 事g,然后它们解释成适合于响应的格式。特定格式取决于正在使用的确切序列化器?<BR>    最单的序列化器?XML 序列化器Q它只是?SAX 事g转换?XML 文。其它序列化器可以生?HTML、纯文本、PDF 文档甚至囑փ。所有这些序列化器都期望 SAX 事g符合一个特D的 XML 词汇表:</SPAN></SPAN><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></P> <UL type=disc> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level1 lfo4; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">HTML 序列化器Q将 XHTML 转换成有效的 HTML </SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level1 lfo4; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">SVG 序列化器Q将 SVG 转换?JPEG ?PNG 囑փ </SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level1 lfo4; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">PDF 序列化器Q将 XSL-FO 转换?PDF 文 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></LI></UL> <P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">接受<SPAN lang=EN-US> XML 内容、对它进行处理,然后为其提供多种格式的能力是 Cocoon 框架的真正力量所在?</SPAN></SPAN><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></P> <H3 style="MARGIN: 13pt 0cm"><FONT size=5><SPAN lang=EN-US>2.1.4</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">条gQ匹配器和选择?/SPAN></FONT></H3> <P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体">MҎ道可能涉及某些条g节。例如,切的处理步骤可能取决于h参数、用h览器{之cȝ因素?SPAN lang=EN-US> <BR><I>    匚w?/I>是两个条件组件中最单的部分Q等价于单的 </SPAN></SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">if</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体"> 语句。如果某个条件ؓ真,则对Ҏ道或者管道的一节进行求倹{?BR>    W二U条件组件是<I>选择?/I>Q它?</SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">if-then-else</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体"> 语句cM。当几个选项之一可用时用选择器,它通常用于在管?I>?/I>创徏条g节,而匹配器则用于测试是否应该进入一个特D管道?BR>    q些lg中的每一个都有几U实现。它们都遵@试h某些斚wQ例如,L名、用户代理、参数或 URLQ或用户会话的公共模式。可以用通配W或正则表达式来完成匚wQ而通常选择器枚举所有可能的倹{?BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"><o:p></o:p></SPAN></P> <H2 style="MARGIN: 13pt 0cm"><SPAN lang=EN-US><FONT face=宋体>2.2<STRONG>让管道工?o:p></o:p></STRONG></FONT></SPAN></H2> <P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体">Ҏ收请求和为响应提供服务的逻辑周期的描q可以归U_下:<SPAN lang=EN-US><BR><BR>Ҏ收请求和为响应提供服务的逻辑周期的描q可以归U_下:<o:p></o:p></SPAN></SPAN></P> <OL type=1> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo5; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">从用h受请求?SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo5; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">定用来解释该请求ƈ生成响应的适当道Q用匹配器Q?SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo5; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">从可用的预配|的lg构造管道?SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo5; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">指示道求服务?SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; LINE-HEIGHT: 150%; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo5; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">由道生成的响应返回用P可能对结果进行高速缓存以便以后用?SPAN lang=EN-US> <o:p></o:p></SPAN></SPAN></LI></OL> <P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体">q是<SPAN lang=EN-US> Cocoon 用来?XML 发布?Web 的基本请?响应周期。要理q一周期QCocoon 提供了一个称?<I>sitemap</I> ?XML 配置文g?o:p></o:p></SPAN></SPAN></P> <H1 style="MARGIN: 17pt 0cm 16.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">三?/SPAN><STRONG><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 13.5pt">安装和配|?/SPAN></STRONG><STRONG><SPAN lang=EN-US style="mso-bidi-font-size: 13.5pt">cocoon<o:p></o:p></SPAN></STRONG></H1> <P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">?SPAN lang=EN-US> Cocoon 部v?Tomcat 中很单,只需?</SPAN></SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">cocoon.war</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"> 复制?</SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">$CATALINA_HOME/ webapps</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"> 目录中,然后重新启动 Tomcat?BR>         除了<I>sitemap</I>QCocoon 只有两个配置文g。可以在 </SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">$CATALINA_HOME/webapps/cocoon/WEB-INF</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"> 中找到它们:<BR><span id="wmqeeuq" class=keyword>       log.xconf</SPAN>Q配|?Cocoon 日志记录。Cocoon ?Apache Log4J 用于内部日志记录Q请参阅<A href="file:///E:/study/cocoon/x-cocoon/x-cocoon/x-cocoon-6-2.html"><SPAN style="COLOR: black">参考资?/SPAN></A>Q。缺省情况下QCocoon 日志文件写?</SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">$CATALINA_HOME\webapps\cocoon\WEB-INF\logs</SPAN></CODE><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">?SPAN lang=EN-US><BR><span id="wmqeeuq" class=keyword>       cocoon.xconf</SPAN>Q配|?Cocoon 高速缓存、数据源和许多其它高U选项?BR>       Z开发目的,?</SPAN></SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">cocoon.xconf</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"> 中进行一处更Ҏ很有帮助的。找C列项Q?BR></SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt"><sitemap file="sitemap.xmap" reload-method="asynchron" check-reload="yes" logger="sitemap"/></SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">    <BR>       现在Q将 </SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">reload-method</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"> 属性的值更改ؓ </SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">synchron</SPAN></CODE><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">。这改变?SPAN lang=EN-US> Cocoon 如何对网站地囄更改作出响应Q网站地图是配置 Cocoon 应用E序的中心位|。将行ؓ更改?</SPAN></SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">synchon</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt"> 意味着 Cocoon 在对Q何请求提供服务之前立即作用于更改。缺省异步行为意味着它将在后台读取更改,因此它们不会马上显C出来。在开发期_当立即结果是更可取的Q但是对于必ȝl尽可能快的为用h务的zd应用E序来说q不是最理想的时候,q可能o人沮丧?o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体"> <o:p></o:p></SPAN></P> <H1 style="MARGIN: 17pt 0cm 16.5pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">四、网站地?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></H1> <P><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">|站地图是管?SPAN lang=EN-US> Cocoon |站的中心位|,它完成两个功能:<o:p></o:p></SPAN></SPAN></P> <UL type=disc> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo6; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">它是在管道中使用lg之前声明它们的位|?SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></LI></UL> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-US style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P> <UL type=disc> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo6; tab-stops: list 36.0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">它是使用声明的组件来定义道的位|?/SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> <SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></LI></UL> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana"> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">下面是一个带说明的比较完整的配置文gQ?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml version="1.0" encoding="UTF-8"?></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:sitemap</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN>xmlns:map="http://apache.org/cocoon/sitemap/1.0"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:components></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:generators default="file"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:generator name="csv" src="com.mycompany.CSVGenerator"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:generators></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:transformers default="xslt"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:transformer<SPAN style="mso-spacerun: yes">  </SPAN>name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">   </SPAN><map:transform src="transforms/content2rss.xsl"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">   </SPAN><map:transform src="transforms/content2svg.xsl"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 1">       </SPAN><SPAN style="mso-tab-count: 1">       </SPAN><map:transform src="transforms/content2fo.xsl"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 2">              </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><!--Cocoon </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">支持从网站地图中传递参数。第一U方法是使用</SPAN><SPAN lang=EN-US> map:parameter </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">元素来完成该d?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参数?/SPAN><SPAN lang=EN-US> name </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US> value </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都被指定?/SPAN><SPAN lang=EN-US> map:parameter </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 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"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">W二个参数元素的值将由匹配模式中的第一个通配W设|?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只要样式表包?/SPAN><SPAN lang=EN-US> xsl:param </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>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:transform src="transforms/content2html.xsl"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:parameter name="myFixedParam" value="fixed-value"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:parameter name="myDynamicParam" value="{1}"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:transform></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><!--</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">另一U将参数传递到样式表的Ҏ允许传递所?/SPAN><SPAN lang=EN-US> URL </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">h参数。例如,如果?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN>http://localhost:8080/content.html?param1=value1&param2=value2 </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></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">则两个参敎ͼ</SPAN><SPAN lang=EN-US>param1 </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US> param2</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> --></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:transform src="transforms/content2html.xsl"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:parameter name="use-request-parameters" value="true"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:transform><SPAN style="mso-spacerun: yes">            </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><!--</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当请求中可能被传递的参数个数是可变时Q这一Ҏ很有用。但是,q是以牺牲一Ҏ能ZLQ因?/SPAN><SPAN lang=EN-US> Cocoon </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对用这一Ҏ的{换的l果q行高速缓存的能力低于那些使用固定参数的{换。如果Q?/SPAN><SPAN lang=EN-US> URL </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参数改变了,即不由样式表直接用,也不会用高速缓存的l果?/SPAN><SPAN lang=EN-US>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:transformers></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:readers default="resource"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:readers></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:serializers default="html"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 1">       </SPAN><SPAN style="mso-spacerun: yes">  </SPAN><map:serialize type="xml"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:serializers></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:matchers default="wildcard"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:matchers></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN></map:components></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:pipelines></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:pipeline></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">     </SPAN><map:match pattern="index.html"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">        </SPAN><map:read src="static/index.html" mime-type="text/html"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">     </SPAN></map:match></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN></map:pipeline></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:pipelines></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:pipeline></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">     </SPAN><map:match pattern="*.css"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">        </SPAN><map:read src="styles/{1}.css" mime-type="text/css"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">     </SPAN></map:match></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">     </SPAN><map:match pattern="**.html"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">        </SPAN><map:read src="static/{1}.html" mime-type="text/html"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">     </SPAN></map:match></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN></map:pipeline></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><!--</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">单一星号与Q意数目的字符匚wQ除了正斜杠</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">双星号与包括正斜杠之外的L数目字符匚w</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>index.html </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的匹配模式应该在</SPAN><SPAN lang=EN-US> *.html </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> </SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><!--</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><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"><SPAN lang=EN-US>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><map:pipe></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN><map:match pattern="content/*.html"></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><!--</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下一步,d一个生成器以从</SPAN><SPAN lang=EN-US> content </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录中读?/SPAN><SPAN lang=EN-US> XML </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>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">    </SPAN><map:generate<SPAN style="mso-spacerun: yes">  </SPAN>src="content/{1}.xml"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">            </SPAN><!--</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下一步,d一个{换器来通过使用特定样式表{?/SPAN><SPAN lang=EN-US> XML </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>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">                </SPAN><map:transform<SPAN style="mso-spacerun: yes">  </SPAN>src="transforms/content2html.xsl"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><!--</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最后,使用一个序列化器将转换l果变成q回l用L</SPAN><SPAN lang=EN-US> HTML </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>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">    </SPAN><map:serialize type="html"/></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">  </SPAN></map:match></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:pipe></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes"> </SPAN><!--</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">h</SPAN><SPAN lang=EN-US> URL http://localhost:8080/content/document.html </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">触发q一道q</SPAN><SPAN lang=EN-US> Cocoon </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">首先?/SPAN><SPAN lang=EN-US> document.xml </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q行解析Q然后在结果传回浏览器之前使用</SPAN><SPAN lang=EN-US> $COCOON_HOME/transforms/content2html.xsl </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来{换它?/SPAN><SPAN lang=EN-US> </SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>--></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></map:sitemap></SPAN></P> <P> </P><img src ="http://www.aygfsteel.com/bibi/aggbug/19460.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/bibi/" target="_blank">g?/a> 2005-11-12 13:47 <a href="http://www.aygfsteel.com/bibi/archive/2005/11/12/19460.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Avalon学习W记http://www.aygfsteel.com/bibi/archive/2005/11/10/Avalon.htmlg?/dc:creator>g?/author>Thu, 10 Nov 2005 14:39:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/10/Avalon.htmlhttp://www.aygfsteel.com/bibi/comments/19222.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/10/Avalon.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/19222.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/19222.html 什么是Avalon?

Avalon原意?凯尔Ҏ传说中的西方乐土?据说亚瑟王及光下死后尸体被Ud该岛?BR>Avalon是五个子目的父目QFramework、Excalibur(亚瑟王的剑)、LogKit、Phoenix(长生鸟、凤?、和Cornerstone(墙角?。Avalon把重Ҏ在服务器端编E和让以服务器应用ؓ中心的项目的设计和维护变得更Ҏ。Avalon可被描述Z个包含了实现的框架?/P>

 

Framework
Avalon Framework是Avalon大伞下的所有其它项目的基础。它定义了接口、契U(contractsQ和Avalon的缺省实现。Framework大部分工作|于其中Q因此也是最为成熟的目?BR>        框架q个词在应用E序中的含义很广泛。重Ҏ在单一行业的框架被UCؓ垂直市场框架Q例如医药系l或通信pȝ。原因是同样的框架不能胜d它行业。具有很好通用性,可用于多个行业的框架被称为水q_场框架。Avalon是一个水q_场框架。您可以使用Avalon的Framework构徏垂直市场框架?BR>        用Avalon构徏的最有说服力的垂直市场框架的例子是Apache Cocoon出版框架。Apache CocoonW?版是使用Avalon的Framework、Excalibur和LogKit目构徏的。它利用了Framework中的接口和契U,让开发者能用更的旉理解Cocoon是如何工作的。它也有效地利用了Excalibur提供的数据源理和组件管理代码,q样它就不必重新发明轮子了。最后,它用了LogKit来处理出版框架中所有的日志问题?/P>

Excalibur
Avalon Excalibur是一l服务器端组Ӟ您可以在自己的项目中使用它们。它包括了池QpoolingQ的实现、数据库q接理和其它一些组件管理的实现?BR> 
LogKit
Avalon LogKit是一个高速日志记录工具集QFramework、Excalibur、Cornerstone和Phoenix都用到它。它的模型与JDK 1.4 Logging package采用相同的原理,但与JDK 1.2+兼容?/P>

Phoenix
Avalon Phoenix是服务器核心Q它理服务QServiceQ实Cؓ服务器端lgQ称作BlockQ的发布和执行。主要采用了SOP思想[面向服务的编E(Service Oriented Programming QSOPQ的思想是把pȝ划分为由pȝ提供的一些服务]。Phoenix把每一U要提供的设施看作是一Ҏ务,q定接口和相关契约l成。服务的实现被称为Block。一个服务器E序是由多种服务l成的,认识q一点很重要?BR> 
Cornerstone
Avalon Cornerstone是一lBlock或服务,q些Block可以布v在Phoenix环境中。这些Block包括了socket理和Block之间的Q务调度?BR> 
Scratchpad
Scratchpadq不是一个真正的正式目Q而是那些q没准备好放入Excalibur中的lg的一个时区域。这些组件品质差别较大,它们的API也不保证会不变,直到它们被提升到Excalibur目为止?BR>

原理和模?BR>Avalon整个是基于一些特定设计原理来构徏的。最重要的两个模式是反向控制QInversion of ControlQ?/EM> ?EM>分离考虑QSeparation of ConcernsQ?/EM> 反向控制QInversion of ControlQIOCQ的概念是指lgL由外部进行管理的。分考虑QSeparation of ConcernsQSOCQ模式是指不同的思考方向来看待您的pȝ。分考虑模式又导致了Aspect Oriented Programming (AOP) 。研I者发现许多考虑不能在类或方法的_度上进行处理。这些考虑被称为aspect。aspect的例子包括管理对象的生命周期、记日志、处理异常和清理释放资源{?/FONT>

]]>
q期学习一下页面流理斚whttp://www.aygfsteel.com/bibi/archive/2005/11/10/19200.htmlg?/dc:creator>g?/author>Thu, 10 Nov 2005 10:03:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/10/19200.htmlhttp://www.aygfsteel.com/bibi/comments/19200.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/10/19200.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/19200.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/19200.html

]]>
一个高效简z的Struts分页Ҏhttp://www.aygfsteel.com/bibi/archive/2005/11/09/struts.htmlg?/dc:creator>g?/author>Wed, 09 Nov 2005 10:03:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/09/struts.htmlhttp://www.aygfsteel.com/bibi/comments/19023.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/09/struts.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/19023.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/19023.html    在网上看了几个Structs分页Q感觉不是很完善Q于是根据自ql验Q写了一个相寚w效简z的分页Ҏ。由于本人水qx限,如果大家有什么更好的xQ欢q不吝赐教?

一?开发环?
我的开发环境是QJBuilder x + Weblogic 8.1 + Oracle 9i + Windows 2003 Q如果朋友们的开发环境不一样亦无妨?

二、开发思\
既然讲的是StrutsQ那自然M了MVCQ分|CZ是如此?
1?建立数据库和对应的表Q本例的表是TCertificate?
2?建立适当的模型组Ӟ对应你要查询数据库中的表。这部分由DAO数据讉K层来实现Q如果有的朋友对DAO不熟悉可以查询一下相兌料。本例由CertificateDAO.java来实现?
3 、徏立分|需要的模型lgQ由javaBean来充当,q与CertificateDAO实现分离。网上介l的很多ҎQ都存在着数据与分늻件藕合的现象Q这也是本方法与其它分页Ҏ的主要不同之处?

4、徏立控制器lgQ这部分由Struts 中的Action来实现。主要负责将实例化CertificateDAOQ只取要昄的数据记录,存入ArrayList对象然后q回Qƈ攑ֈrequest中。而分部分则Ҏ分页条gQ单独进行构造,避免了与DAO混在一L情况发生。网上其它介l的一些分|法中Q基本上都是一ơ性读出所有查询的数据Q然后再由分늛关组件进行构造。这P如果数据量大的话Q很Ҏ形成瓉。在本例中由于不是一ơ性地d查询的所有数据,而只是读Z个页面要昄的数据记录,q就节省了很多不必要的数据传输,提高了效率。本例中为CertificateAction.java?

5、徏立视囄Ӟq部分由jsp来充当,Z不出现java 代码Q我们用Struts提供的标{ֺQ主要负责从request中取出刚刚放入的对象Q通过反复调用CertificateAction以及action参数Q而实现分|C。本例中为listcertificate.jsp?
6?建立q|struts-config.xml?

三、实例代?
定好上面的开发思\后,代码的实现就有单可@了?
1、徏数据库和相应的表?
2、数据逻辑层的相关代码?
1Q、通用的DAOc:CommonDAO.java
q是一个很多DAO都要l承到的通用DAOc,是我Ҏ实践ȝ出来的,Z减少幅Q这里只昄和本例相关的代码?


java代码:

package com.xindeco.business ;
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.sql.*;
import java.lang.IllegalAccessException;
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.beanutils.BeanUtils;
public class DAO
{
  protected DataSource ds;
/**
  * 说明:取得当前查询的总记录数
  */
public int getRows ()
{
  return this.count;
}
  public void rsHandler (ResultSet rs, int offset, int limit)
  {
   try
   {
    count = 0;
    rs.absolute ( -1) ;
    count = rs.getRow () ;
    if (offset <= 0)
    {
     rs.beforeFirst () ;
    }
    else
    {
     rs.absolute (offset) ;
    }
   }
   catch (Exception e)
   {
    e.printStackTrace () ;
   }
  }
  public DAO(DataSource ds) {
          this.ds = ds;
  }

  public void setDataSource(DataSource ds) {
    this.ds = ds;
  }

  protected void close(ResultSet rs) {
    if (rs != null) {
            try {
                    rs.close();
            } catch (SQLException e) {
            }
            rs = null;
    }
  }

  protected void close(PreparedStatement pstmt) {
    if (pstmt != null) {
            try {
                    pstmt.close();
            } catch (SQLException e) {
            }
            pstmt = null;
    }
  }
  protected void close(Connection conn) {
    if (conn != null) {
            try {
                    conn.close();
            } catch (SQLException e) {
                    e.printStackTrace();
            }
            conn = null;
    }
  }

  protected void rollback(Connection conn) {
    if (conn != null) {
            try {
                    conn.rollback();
            } catch (SQLException e) {
                    e.printStackTrace();
            }
            conn = null;
    }
  }
}


q个cM要是通过子类传进来的先进l果集,取得查询的记录LQƈҎ据库q接q行单的理?
2Q、对数据库进行访问:CertificateDAO.java


java代码:

package com.xindeco.business;

import java.io.*;
import java.sql.*;
import java.util.*;
import javax.sql.*;

import com.xindeco.common.dbconn.DbConn;

public class CertificateDAO extends DAO
{

  public NationDAO(DataSource ds) {
    super(ds);
  }

public List findCertificateList(int offset,int limit) throws SQLException
        {
        int countRows = 0 ;
        ArrayList list = null ;
    Connection conn = null;
    PreparedStatement pstmt = null;
ResultSet rs = null;
try
        {
             conn = ds.getConnection();
                String sql =
                                "SELECT certificateID, certificateCode,certificateName,photoURL,"
                                + "description,graduateID FROM TCertificate " ;
      pstmt = conn.prepareStatement(sql);
      rs = pstmt.executeQuery();
                        /*Ҏ标进行处理,rsHandler Ҏ在父cDAO?/
                        this.rsHandler(rs,offset,limit);
                        if (rs != null && rs.next ())
                        {
                                list = new ArrayList () ;
                                do
                                {
                                        countRows++ ;
                                        list.add (rs2VO (rs)) ;
                                }
                                while ( (countRows++ < limit) && rs.next ()) ;
                        }
      close(rs);
      close(pstmt);
          } catch (SQLException e) {
      close(rs);
      close(pstmt);
      rollback(conn);
                e.printStackTrace();
                  }
finally {
            close(conn);
    }
        return list ;
        }

        private CertificateVO rs2VO (ResultSet rs)
        {
                try
                {
                        CertificateVO certificateVO = new CertificateVO () ;
                        certificateVO.setCertificateID (rs.getInt ("certificateID")) ;
                        certificateVO.setCertificateCode (rs.getString ("certificateCode")) ;
                        certificateVO.setCertificateName (rs.getString ("certificateName")) ;
                        certificateVO.setPhotoURL (rs.getString ("photoURL")) ;
                        certificateVO.setDescription (rs.getString ("description")) ;
                        certificateVO.setGraduateID (rs.getInt ("graduateID")) ;
                        return certificateVO ;
                }
                catch (Exception ex)
                {
                        ex.printStackTrace () ;
                        return null ;
                }
        }
}

findCertificateList(int offset,int limit)是查得所有要昄的数据,q放入ArrayList中。看q网上有些例子,把数据记录放入ArrayList的动作过E直接在while循环体里完成Q如果字D多的话Q会造成Ҏq于宠大Q又不美观?q里Q数据记录放入ArrayList的动作过E由rs2VOҎ完成Q就比较整洁了。另外,if (rs != null && rs.next ()) 配合while ( (countRows++ < limit) && rs.next ()) 是ؓ了程序的健壮性考虑的,E分析一下不隑־出结论?

3、徏立控制器lgQCertificateAction.java


java代码:

package com.xindeco.presentation;

import javax.sql.* ;
import java.util.* ;

import javax.servlet.http.* ;
import javax.servlet.* ;

import org.apache.struts.action.* ;
import org.apache.struts.util.* ;

import com.xindeco.common.Pager;
import com.xindeco.business.graduatedata.CertificateDAO ;

public class CertificateAction
        extends Action
{
        private static final int PAGE_LENGTH = 5 ; //每页昄5条记?
        public ActionForward execute (ActionMapping mapping, ActionForm form,
                                                                  HttpServletRequest request,
                                                                  HttpServletResponse response)
        {
                ActionForward myforward = null ;
                String myaction = mapping.getParameter () ;

                if (isCancelled (request))
                {
                        return mapping.findForward ("failure") ;
                }
                if ("".equalsIgnoreCase (myaction))
                {
                        myforward = mapping.findForward ("failure") ;
                }
                else if        ("LIST".equalsIgnoreCase (myaction))
                {
                        myforward = performList (mapping, form, request, response) ;
                }
                else
                {
                        myforward = mapping.findForward ("failure") ;
                }
                return myforward ;
        }

        private ActionForward performList (ActionMapping mapping,
                                                                           ActionForm actionForm,
                                                                           HttpServletRequest request,
                                                                           HttpServletResponse response)
        {
                     try
                {
        DataSource ds = (DataSource) servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);

                CertificateDAO   certificateDAO  = new CertificateDAO  (ds) ;

                        int offset = 0;   //页时的起始记录所在游?
                        int length = PAGE_LENGTH;  
                        String pageOffset = request.getParameter("pager.offset");
                if (pageOffset == null || pageOffset.equals("")) {
        offset = 0;
      } else {
        offset = Integer.parseInt(pageOffset);
      }
                        List certificateList = certificateDAO .findCertificateList (offset,length) ;
                        int size = certificateDAO.getRows(); //  取得总记录数
                        String url = request.getContextPath()+"/"+mapping.getPath()+".do";
                        String pagerHeader = Pager.generate(offset, size, length, url); //分页处理

                        request.setAttribute ("pager", pagerHeader) ;
                        request.setAttribute ("list", certificateList) ;
                }
                catch (Exception e)
                {
                        e.printStackTrace();
                        return mapping.findForward ("error") ;
                }
                return mapping.findForward ("success") ;
        }
}


CertificateAction.java主要是把数据从DAO中取出,q放入一个ArrayList 中,然后通过配置文g再Y件View的JSPc?

5、徏立视图listcertificate.jsp文g?

java代码:

<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<table bgcolor="#666666" cellpadding="1" cellspacing="0" border="0" width="500">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="500">
<tr>
<td bgcolor="#fecc51">&</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" width="500">
  <tr>
<td bgcolor="#d6e0ed">
    &&<bean:message key="label.list4certificate"/>
  </td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="5%"></td><td width="19%"></td><td width="76%"></td>
</tr>
    <tr>
<td>
<table bgcolor="#f2f2f2" width="500" cellspacing="0" border="0">
      <tr bgcolor="#bacce1">
        <td><b><bean:message key="Certificate.select"/> </b></td>
        <td><b><bean:message key="Certificate.certificateID"/> </b></td>
        <td><b><bean:message key="Certificate.certificateCode"/></b></td>
        <td><b><bean:message key="Certificate.certificateName"/></b></td>
        <td><b><bean:message key="Certificate.view"/></b></td>
    ?/tr>

<bean:write name="pager" property="description"/>
  <logic:equal name="pager" property="hasPrevious" value="true">
              <a href="/graduatedata/list.do?viewPage=<bean:write name="pager" property="previousPage"/>" class="a02">
           Previous
        </a>
  </logic:equal>
  <logic:equal name="pager" property="hasNext" value="true">
    ?a href="/graduatedata/list.do?viewPage=<bean:write name="pager" property="nextPage"/>" class="a02">
     Next
    ?/a>
  </logic:equal>

<logic:notEmpty name="list" scope="request">
<logic:iterate id="certificate" name="list" type="com.xindeco.business.graduatedata.CertificateVO"scope="request">
<tr bgcolor="#FFFFFF">
    ?td><html:text property="name" value="<bean:write name="certificate" property="certificateID" scope="page"/>"/>
                </td>
    ?td> <bean:write name="certificate" property="certificateID" scope="page"/></td>
    ?td> <bean:write name="certificate" property="certificateCode" scope="page"/></td>
    ?td> <bean:write name="certificate" property="certificateName" scope="page"/></td>
    ?td> <bean:write name="certificate" property="photoURL" scope="page"/></td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

6、对应的配置文gstruts-config.xml?

java代码:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
  <form-beans>
    <form-bean name="certificateForm" type="com.xindeco.presentation.graduatedata.CertificateForm" />
  </form-beans>
  <global-forwards>
    <forward name="error" path="/error/error.jsp" />
  </global-forwards>
  <action-mappings>
      <action name="certificateForm" parameter="LIST" path="/graduatedata/list" scope="request" type="com.xindeco.presentation.graduatedata.CertificateAction" validate="true">
      <forward name="success" path="/graduatedata/listcertificate.jsp" />
    </action>
  </action-mappings>
…?
</struts-config>

7、最后当然是最重要的分代码了QPager.java

java代码:

package com.xindeco.common;

import java.util.* ;
public class Pager {
  private static int MAX_PAGE_INDEX = 10; //脚昄多少?
  private static String HEADER = "Result page";
  
  public static String generate(int offset, int length, int size, String url) {
        if (length > size) {
          String pref;
          if (url.indexOf("?") > -1) {
                pref = "&";
          } else {
                pref = "?";
          }
          String header = "<font face='Helvetica' size='-1'>"+HEADER+": ";
          if (offset > 0) {
                header += "&<a href=\""+url+pref+"pager.offset="+(offset-size)+"\">[<< Prev]</a>\n";
          }
          int start;
          int radius = MAX_PAGE_INDEX/2*size;
          if (offset < radius) {
                start = 0;
          } else if(offset < length-radius) {
                start = offset - radius;
          } else {
                start = (length/size-MAX_PAGE_INDEX)*size;
          }
          for(int i=start;i<length && i < start + MAX_PAGE_INDEX*size;i+=size) {
                if (i == offset) {
                  header += "<b>"+(i/size+1)+"</b>\n";
                } else {
                  header += "&<a href=\""+url+pref+"pager.offset="+i+"\">"+(i/size+1)+"</a>\n";
                }
          }
          if(offset < length - size) {
                header += "&<a href=\""+url+pref+"pager.offset="+((int)offset+(int)size)+"\">[Next >>]</a>\n";
          }
          header += "</font>";
          return header;
        } else {
          return "";
        }
  }
}

q部分代码的实现相当z,但已l够完成所需了?/P>

]]>
《Spring Web Flow 介绍》PPt文http://www.aygfsteel.com/bibi/archive/2005/11/09/swf.htmlg?/dc:creator>g?/author>Wed, 09 Nov 2005 09:48:00 GMThttp://www.aygfsteel.com/bibi/archive/2005/11/09/swf.htmlhttp://www.aygfsteel.com/bibi/comments/19019.htmlhttp://www.aygfsteel.com/bibi/archive/2005/11/09/swf.html#Feedback0http://www.aygfsteel.com/bibi/comments/commentRss/19019.htmlhttp://www.aygfsteel.com/bibi/services/trackbacks/19019.html点击下蝲?img src ="http://www.aygfsteel.com/bibi/aggbug/19019.html" width = "1" height = "1" />

]]>
վ֩ģ壺 ľ| ʩ| | | | | ػ| ɽ| ƴ| | | ʳ| IJ| | | żҿ| ˮ| | Ʊ| ƽ| Զ| | ΢| | н| | | | | ɽ| | | | ຣʡ| | ʯɽ| ̶| Ҫ| | | е|