﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-鱼上游-随笔分类-爪哇世界探险</title><link>http://www.blogjava.net/bibi/category/4657.html</link><description>&lt;font size=2&gt;笨鸟后飞，天空会有我翅膀划过的痕迹！&lt;br&gt;关注世界，真情人生，扫描人间百态！&lt;br&gt;My contact: o_olle_e@hotmail.com&lt;/font&gt; 
</description><language>zh-cn</language><lastBuildDate>Sat, 31 May 2008 11:14:00 GMT</lastBuildDate><pubDate>Sat, 31 May 2008 11:14:00 GMT</pubDate><ttl>60</ttl><item><title>Tips for development</title><link>http://www.blogjava.net/bibi/archive/2008/04/21/194571.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Mon, 21 Apr 2008 10:03:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2008/04/21/194571.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/194571.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2008/04/21/194571.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/194571.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/194571.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left">
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<br />
						<b>1)UnabletoreadTLD"<font size="5">META</font>-INF/c.tld"fromJAR</b>
						<br />DeleteServlet.jarandjsp.jarfromWEB-INF/lib.<br /><br /><b style="mso-bidi-font-weight: normal">2)AntTips:</b><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-para-margin-left: 2.0gd" align="left">
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">a)&lt;classpath&gt;<br /><b><span style="COLOR: red">&lt;pathelementpath="${classpath}"/&gt;<br />&lt;pathelementlocation="lib/helper.jar"/&gt;</span><br /></b>&lt;/classpath&gt;<br /></span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">b)&lt;classpath&gt;<br /><span style="mso-tab-count: 1">      </span><span style="COLOR: red">&lt;</span></span>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">pathelementpath="${classpath}"/</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&gt;</span>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">方式</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">①</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">：引用特定的变量</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-para-margin-left: 2.0gd; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">      </span>
						<span style="COLOR: red">&lt;</span>
				</span>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">filesetdir="lib"</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&gt;</span>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">方式</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">②</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">：指向特定的文件集</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<br />
						<span style="mso-tab-count: 2">           </span>&lt;includename="**/*.jar"/&gt;<br /><span style="mso-tab-count: 1">      </span>&lt;/fileset&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-para-margin-left: 2.0gd; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 2">           </span>
						<span style="COLOR: red">&lt;</span>
				</span>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">pathelementlocation="classes"/</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&gt;</span>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">方式</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">③</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">：指向单个目录</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-para-margin-left: 2.0gd; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">      </span>
						<span style="COLOR: red">&lt;</span>
				</span>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">dirsetdir="${build.dir}"</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&gt;</span>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">方式</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">④</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">：指向特定目录集</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<br />
						<span style="mso-tab-count: 2">           </span>&lt;includename="apps/**/classes"/&gt;<br /><span style="mso-tab-count: 2">           </span>&lt;excludename="apps/**/*Test*"/&gt;<br /><span style="mso-tab-count: 1">      </span>&lt;/dirset&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-para-margin-left: 2.0gd; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-tab-count: 1">      </span>
						<span style="COLOR: red">&lt;</span>
				</span>
				<b>
						<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">filelistrefid="third-party_jars"/</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&gt;</span>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">方式</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt">⑤</span>
				</b>
				<b>
						<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">：引用指定文件列表</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<br />&lt;/classpath&gt;<br />c) &lt;copy todir="${web.inf.classes}"&gt;<br />  &lt;fileset dir="src/resources"&gt;<br />   &lt;include name="**/spring/*.xml" /&gt;<br />   &lt;include name="**/xfire/*.xml" /&gt;<br />  &lt;/fileset&gt;<br />  &lt;fileset dir="src/main"&gt;<br />   &lt;include name="**/*.xml" /&gt;<br />  &lt;/fileset&gt;<br /> &lt;/copy&gt;<br /></span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
								<br />3)<span style="mso-bidi-font-weight: bold">Failed to setup clustering", what does it mean?<br /><o:p></o:p></span></span>
				</b>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">
								<br />  </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">[JBossCacheService][main] jboss.cache:service=TomcatClusteringCache service to Tomcat clustering not found<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">  </span>[JBossCacheManager][main] JBossCacheService to Tomcat clustering not found<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">  </span>[TomcatDeployer][main] Failed to setup clustering, clustering disabled<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">There's two possibilities here: <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">1) Since 3.2.6, HTTP session replication is based on <a href="http://wiki.jboss.org/wiki/JBossCache"><span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">JBossCache</span></a>, and more precisely the <a href="http://wiki.jboss.org/wiki/TomcatClusteringCache"><span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">TomcatClusteringCache</span></a> 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 &lt;depends optional-attribute-name="CacheName<a href="http://wiki.jboss.org/wiki/CacheName"><span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">?</span></a>"&gt; element, update the MBean <a href="http://wiki.jboss.org/wiki/ObjectName"><span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">ObjectName</span></a> as well as the &lt;depends&gt; element itself. <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">The resulting code should look as follows:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>&lt;!--<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">         </span>Configuration for HTTP Session Clustering using JBossCache<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>--&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>&lt;depends&gt;jboss.cache:service=TomcatClusteringCache&lt;/depends&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">instead of <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>&lt;!--<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">         </span>Configuration for HTTP Session Clustering using JBossCache<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>--&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>&lt;!--<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>&lt;depends optional-attribute-name="CacheName"&gt;jboss.cache:service=TreeCache&lt;/depends&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">
						<span style="mso-spacerun: yes">      </span>--&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">2) This error could also come up if you're trying to remove the clustering capabilities from the all configuration as explained in <a href="http://wiki.jboss.org/wiki/JBossASTuningSliming"><span style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">JBossASTuningSliming</span></a>. Even though you might have modified jbossweb-tomcat5x.sar/META-INF/jboss-service.xml to remove the dependency on <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">jboss.cache:service=TomcatClusteringCache<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">, if the web application is deployed as <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&lt;distributable/&gt;<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">, AS will try starting up <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="BACKGROUND: white; MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; mso-line-height-rule: exactly; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">jboss.cache:service=TomcatClusteringCache<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 15pt; mso-line-height-rule: exactly">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">, 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.</span>
				<br />
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-font-kerning: 0pt">
						<o:p>
								<br />4) 一次性导出所有oracle sequence<br /></o:p>
				</span>
				<br />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' <br /><br />5) Ora-01033: Oracle initialization or shutdown in process.</p>
		<br />
		<font size="1">SID_LIST_LISTENER =<br />(SID_LIST =<br />(SID_DESC =<br />(SID_NAME = PLSExtProc)<br />(ORACLE_HOME = D:\Database\oracle\product\10.1.0\Db_1)<br />(PROGRAM = extproc)<br />)<br />#(SID_DESC = <br /># (GLOBAL_DBNAME = Abel)<br /># (ORACLE_HOME = D:\Database\oracle\product\10.1.0\Db_1)<br /># (SID_NAME = Abel)<br />#)<br />)<br /></font>
<img src ="http://www.blogjava.net/bibi/aggbug/194571.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2008-04-21 18:03 <a href="http://www.blogjava.net/bibi/archive/2008/04/21/194571.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于opencms把sites目录中的文件根据URL显示到网页的解决方法</title><link>http://www.blogjava.net/bibi/archive/2006/08/11/62966.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Fri, 11 Aug 2006 04:59:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2006/08/11/62966.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/62966.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2006/08/11/62966.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/62966.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/62966.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 关于opencms把sites目录中的文件根据URL显示到网页的解决方法&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2006/08/11/62966.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/62966.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2006-08-11 12:59 <a href="http://www.blogjava.net/bibi/archive/2006/08/11/62966.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>opencms开发常见问题，欢迎大家补充</title><link>http://www.blogjava.net/bibi/archive/2006/08/08/62358.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Tue, 08 Aug 2006 07:07:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2006/08/08/62358.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/62358.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2006/08/08/62358.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/62358.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/62358.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 用opencms开发了几天，现整理一些出来，以后再慢慢加~~&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2006/08/08/62358.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/62358.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2006-08-08 15:07 <a href="http://www.blogjava.net/bibi/archive/2006/08/08/62358.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>水晶报表系列文章 -- 用Swing方式显示报表</title><link>http://www.blogjava.net/bibi/archive/2005/12/24/25289.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Sat, 24 Dec 2005 03:00:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/12/24/25289.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/25289.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/12/24/25289.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/25289.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/25289.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 从官方下载的crystal reports 11没有SWing显示报表的JRC，上次问了TW的maike wang也说没有；还多亏了网友小虫，他公司有正式版的，把缺少的几个JAR包发给了我，才能如愿以偿。&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/12/24/25289.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/25289.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-12-24 11:00 <a href="http://www.blogjava.net/bibi/archive/2005/12/24/25289.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何把awt或者swing的UI生成一个图形文件</title><link>http://www.blogjava.net/bibi/archive/2005/12/20/24822.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Tue, 20 Dec 2005 09:16:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/12/20/24822.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/24822.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/12/20/24822.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/24822.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/24822.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/12/20/24822.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/24822.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-12-20 17:16 <a href="http://www.blogjava.net/bibi/archive/2005/12/20/24822.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Rule Of Development</title><link>http://www.blogjava.net/bibi/archive/2005/12/20/24819.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Tue, 20 Dec 2005 09:07:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/12/20/24819.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/24819.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/12/20/24819.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/24819.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/24819.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/12/20/24819.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/24819.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-12-20 17:07 <a href="http://www.blogjava.net/bibi/archive/2005/12/20/24819.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cocoon系列——开发一个简单的Web流程</title><link>http://www.blogjava.net/bibi/archive/2005/12/14/23927.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Wed, 14 Dec 2005 10:53:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/12/14/23927.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/23927.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/12/14/23927.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/23927.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/23927.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 晕菜，被cocoon与mysql的DB连接搞得头疼。在这之前mysql和jdbc连接一直是可以用的，不过前几天升级了一下mysql，但版本差别不大，版本号前面都有一个5。另外因为是第一次在cocoon配置，以为是配置文件搞错了，就在那里瞎折腾。到最后，才决定要看看究竟是不是mysql的JDBC驱动版本引起的，就写了一个简单的JSP测试页，结果……&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/12/14/23927.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/23927.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-12-14 18:53 <a href="http://www.blogjava.net/bibi/archive/2005/12/14/23927.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cocoon系列 —— XML Server Pages（XSP） 笔记</title><link>http://www.blogjava.net/bibi/archive/2005/12/08/23025.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Thu, 08 Dec 2005 12:08:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/12/08/23025.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/23025.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/12/08/23025.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/23025.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/23025.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: XSP可以将动态数据添加到XML 文档中以创建更丰富的网站，也可以使 Cocoon 2 集成现有数据源和／或 API 以在因特网上用多种格式发布数据。它是一种能够创建动态 XML 数据源以便将数据传输到 Cocoon 2 管道的 Cocoon 2 技术。通过使用 XML 标记和应用逻辑的组合来描述这些数据源，然后由 Cocoon 2 引擎自动将这种组合编译为 Java 类。XSP 为使用 Cocoon 2 开发应用程序提供了一个灵活的平台。例如，Cocoon 2 应用程序可以显示现有应用程序数据库中的信息，而且启用了更为多样的数据发送选项。通过提供一种通过 XML 界面显示数据源的方法，XSP 允许在诸如中间件和文档发布那样的应用程序集成环境中使用 Cocoon 2。&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/12/08/23025.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/23025.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-12-08 20:08 <a href="http://www.blogjava.net/bibi/archive/2005/12/08/23025.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>水晶报表系列文章--优化策略笔记</title><link>http://www.blogjava.net/bibi/archive/2005/12/07/22919.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Wed, 07 Dec 2005 14:02:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/12/07/22919.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/22919.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/12/07/22919.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/22919.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/22919.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 一般情况下，无论以何种方式分发报表，都会遇到类似的性能问题。按照以下这些策略操作，您会发现不仅在多用户 Web 环境下性能显著提高，在单用户情形下性能也会显著提高。&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/12/07/22919.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/22919.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-12-07 22:02 <a href="http://www.blogjava.net/bibi/archive/2005/12/07/22919.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>水晶报表系列文章--FAQ</title><link>http://www.blogjava.net/bibi/archive/2005/12/07/22888.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Wed, 07 Dec 2005 08:57:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/12/07/22888.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/22888.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/12/07/22888.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/22888.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/22888.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 将这几天使用CR的FAQ整理出来，共享一下&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/12/07/22888.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/22888.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-12-07 16:57 <a href="http://www.blogjava.net/bibi/archive/2005/12/07/22888.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>格式化任意的时间格式</title><link>http://www.blogjava.net/bibi/archive/2005/11/28/21693.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Mon, 28 Nov 2005 09:08:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/28/21693.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/21693.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/28/21693.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/21693.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/21693.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 上礼拜帮同学写的，未作整理。&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/11/28/21693.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/21693.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-28 17:08 <a href="http://www.blogjava.net/bibi/archive/2005/11/28/21693.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>GOOGLE挑战赛练习题3及答案(1000分) </title><link>http://www.blogjava.net/bibi/archive/2005/11/28/21624.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Mon, 28 Nov 2005 02:38:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/28/21624.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/21624.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/28/21624.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/21624.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/21624.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本题得分892.03分。&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/11/28/21624.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/21624.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-28 10:38 <a href="http://www.blogjava.net/bibi/archive/2005/11/28/21624.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>GOOGLE挑战赛练习题2及答案(500分)</title><link>http://www.blogjava.net/bibi/archive/2005/11/28/21623.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Mon, 28 Nov 2005 02:36:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/28/21623.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/21623.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/28/21623.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/21623.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/21623.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本题得460.56分。&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/11/28/21623.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/21623.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-28 10:36 <a href="http://www.blogjava.net/bibi/archive/2005/11/28/21623.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>GOOGLE挑战赛练习题1及答案(200分)</title><link>http://www.blogjava.net/bibi/archive/2005/11/28/21620.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Mon, 28 Nov 2005 02:32:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/28/21620.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/21620.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/28/21620.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/21620.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/21620.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 总得分1485.45分，在300多人中，暂时排名12，但本题只得132.86分。&nbsp;&nbsp;<a href='http://www.blogjava.net/bibi/archive/2005/11/28/21620.html'>阅读全文</a><img src ="http://www.blogjava.net/bibi/aggbug/21620.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-28 10:32 <a href="http://www.blogjava.net/bibi/archive/2005/11/28/21620.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Cocoon学习笔记 -- 基础篇</title><link>http://www.blogjava.net/bibi/archive/2005/11/12/19460.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Sat, 12 Nov 2005 05:47:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/12/19460.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/19460.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/12/19460.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/19460.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/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'">，它能做什么</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 是一种 Java 服务器框架，它允许使用 XSLT（XML 样式表语言转换 (XML Stylesheet Language-Transformation)）转换动态发布 XML 内容。通过依靠 XML 描述内容以及使用 XSLT 将内容转换成多种格式，Cocoon 提供了用于构建内容、逻辑和表示在很大程度上彼此分离的应用程序的平台。 <o:p></o:p></SPAN></P>
<P style="LINE-HEIGHT: 150%"><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体">Cocoon 使用管道的概念来描述将内容发布到 Web 的过程。管道由一些输入数据以及随后对它进行的一些处理步骤构成。每个处理步骤接受前一步的输出作为输入，一直到达管道的末端并产生最终输出。它包含各种各样的可重用组件，这些组件可以配置成使用最低限度的 Java 开发生成复杂的行为。例如，通过单独使用 XML 和 XSLT，Cocoon 可用于：<o:p></o:p></SPAN></P>
<UL type=disc>
<LI 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 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 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 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 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">&nbsp;<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">体系结构的原理</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">首先，处理<SPAN lang=EN-US> XML 文档可分成几个离散的步骤。这些步骤的组合描述处理<I>管道</I>。管道由输入、某些处理以及输出构成。Cocoon 2 使用 SAX 事件作为每个处理步骤之间的连接。<BR>第二，可以使用特殊类型的组件来对管道中的每个阶段建模。例如，用生成器生成输入，用序列化器生成输出。<BR>第三，对用户请求的响应包括确定为请求（与其输入一起）服务的正确管道，然后指示管道执行其处理以生成给用户的响应。 <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">管道组件</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 包含许多常规管道组件，可以用有用的方法将它们连接起来。根据这些组件在管道中扮演的角色，可以将它们分组成几种完全不同的类型。<o:p></o:p></SPAN></P>
<UL type=disc>
<LI 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 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 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 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></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 管道通常至少由生成器和序列化器组成，但可能含有任意数量的处理步骤。将数据作为 SAX 事件通过 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: 宋体">负责读取数据源（例如，文件），然后将该数据作为一系列<SPAN lang=EN-US> SAX 事件传递到管道。因此，最简单的生成器是 SAX 解析器。通常，任何可以被映像成一系列 SAX 事件的数据源都可以成为生成器的基础。 <BR>在 Cocoon 中有许多可用的生成器。最有用的是：<o:p></o:p></SPAN></SPAN></P>
<UL type=disc>
<LI 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: 宋体">FileGenerator：从文件系统或 Web 读取 XML 文件 <o:p></o:p></SPAN></LI>
<LI 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: 从文件系统或 Web 读取 HTML 文件 <o:p></o:p></SPAN></LI>
<LI 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: 宋体">DirectoryGenerator：读取文件系统以提供目录清单 <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 管道模型中的特例，因为它们不是理解 XML 的组件。阅读器只是访问外部资源，然后将它直接复制到响应。通常使用它们来提供静态文件（例如，图像或 CSS 样式表）。可以将阅读器视为自包含的管道；它们生成输入数据，然后将数据序列化成响应。<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: 宋体">&nbsp;&nbsp;&nbsp; 转换器</SPAN></I><SPAN style="COLOR: black; FONT-FAMILY: 宋体">是<SPAN lang=EN-US> Cocoon 管道中的主要处理步骤。它们接受 SAX 事件作为输入，执行一些有用的处理，然后将结果作为 SAX 事件传入管道。一种查看转换器的有用方法是作为在 SAX 事件流通过它时修改 SAX 事件流的组件。在这一点上，它们类似于 SAX 过滤器。 <BR>&nbsp;&nbsp;&nbsp; 使用最广泛的转换器是 XSLT 转换器。它将其输入传递到执行 XSLT 转换的 XSLT 处理器中。然后将转换的结果作为 SAX 事件反馈到管道。 <BR><I>&nbsp;&nbsp;&nbsp; 操作</I>是将附加动态行为插入管道的一种方法，并且通常为特殊应用程序定制。但是，某些一般的操作与 Cocoon 捆在一起，例如，执行数据库交互，表单验证和发送邮件等。操作的成功完成还会影响是否执行后续处理步骤。<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">输出：序列化器</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">&nbsp;&nbsp;&nbsp; 序列化器</SPAN></I><SPAN style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">是<SPAN lang=EN-US> Cocoon 管道中的端点。它们负责接收直接从生成器（在可能最短的管道中）或者以前的处理步骤（例如转换器）产生的 SAX 事件流，然后将它们解释成适合于响应的格式。特定格式取决于正在使用的确切序列化器。 <BR>&nbsp;&nbsp;&nbsp; 最简单的序列化器是 XML 序列化器，它只是将 SAX 事件转换回 XML 文档。其它序列化器可以生成 HTML、纯文本、PDF 文档甚至图像。所有这些序列化器都期望 SAX 事件流符合一个特殊的 XML 词汇表：</SPAN></SPAN><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></P>
<UL type=disc>
<LI 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 序列化器：将 XHTML 转换成有效的 HTML </SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></LI>
<LI 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 序列化器：将 SVG 转换成 JPEG 或 PNG 图像 </SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><o:p></o:p></SPAN></LI>
<LI 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 序列化器：将 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'">条件：匹配器和选择器</SPAN></FONT></H3>
<P style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体">任何特殊管道可能涉及某些条件节。例如，确切的处理步骤可能取决于请求参数、用户浏览器等之类的因素。<SPAN lang=EN-US> <BR><I>&nbsp;&nbsp;&nbsp; 匹配器</I>是两个条件组件中最简单的部分，等价于简单的 </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>&nbsp;&nbsp;&nbsp; 第二种条件组件是<I>选择器</I>，它与 </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: 宋体"> 语句类似。当几个选项之一可用时使用选择器，它通常用于在管道<I>中</I>创建条件节，而匹配器则用于测试是否应该进入一个特殊管道。<BR>&nbsp;&nbsp;&nbsp; 这些组件中的每一个都有几种实现。它们都遵循测试请求某些方面（例如，主机名、用户代理、参数或 URL）或用户会话的公共模式。可以使用通配符或正则表达式来完成匹配，而通常选择器枚举所有可能的值。<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: 宋体">对接收请求和为响应提供服务的逻辑周期的描述可以归纳如下：<SPAN lang=EN-US><BR><BR>对接收请求和为响应提供服务的逻辑周期的描述可以归纳如下：<o:p></o:p></SPAN></SPAN></P>
<OL type=1>
<LI 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 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 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 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 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></OL>
<P style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><SPAN style="COLOR: black; FONT-FAMILY: 宋体">这是<SPAN lang=EN-US> Cocoon 用来将 XML 发布到 Web 的基本请求-响应周期。要管理这一周期，Cocoon 提供了一个称为 <I>sitemap</I> 的 XML 配置文件。<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 部署到 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;除了<I>sitemap</I>，Cocoon 只有两个配置文件。可以在 </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 class=keyword>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log.xconf</SPAN>：配置 Cocoon 日志记录。Cocoon 将 Apache Log4J 用于内部日志记录（请参阅<A href="file:///E:/study/cocoon/x-cocoon/x-cocoon/x-cocoon-6-2.html"><SPAN style="COLOR: black">参考资料</SPAN></A>）。缺省情况下，Cocoon 将日志文件写入 </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 class=keyword>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cocoon.xconf</SPAN>：配置 Cocoon 高速缓存、数据源和许多其它高级选项。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 出于开发目的，在 </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"> 中进行一处更改是很有帮助的。找到下列项：<BR></SPAN><CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 7.5pt; mso-ansi-font-size: 12.0pt">&lt;sitemap file="sitemap.xmap" reload-method="asynchron" check-reload="yes" logger="sitemap"/&gt;</SPAN></CODE><SPAN lang=EN-US style="COLOR: black; FONT-FAMILY: 宋体; mso-bidi-font-size: 13.5pt">&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 现在，将 </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 如何对网站地图的更改作出响应，网站地图是配置 Cocoon 应用程序的中心位置。将行为更改为 </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 将在对任何请求提供服务之前立即作用于更改。缺省异步行为意味着它将在后台读取更改，因此它们将不会马上显示出来。在开发期间，当立即结果是更可取的，但是对于必须继续尽可能快的为用户服务的活动应用程序来说并不是最理想的时候，这可能令人沮丧。<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: 宋体">&nbsp;<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 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 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">&nbsp;</SPAN><o:p></o:p></SPAN></P>
<UL type=disc>
<LI 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">&nbsp;<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">下面是一个带说明的比较完整的配置文件：</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>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:sitemap</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>xmlns:map="http://apache.org/cocoon/sitemap/1.0"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:components&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:generators default="file"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:generator name="csv" src="com.mycompany.CSVGenerator"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:generators&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:transformers default="xslt"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:transformer<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>name="xslt" src="org.apache.cocoon.transformation.TraxTransformer"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>&lt;map:transform src="transforms/content2rss.xsl"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>&lt;map:transform src="transforms/content2svg.xsl"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:transform src="transforms/content2fo.xsl"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;!--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> 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'">参数的</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'">使用这一方法将固定的和动态的参数都传递到样式表中是有可能的。</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></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'">元素，参数就能正确地被传递到转换。</SPAN><SPAN lang=EN-US>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:transform src="transforms/content2html.xsl"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:parameter name="myFixedParam" value="fixed-value"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:parameter name="myDynamicParam" value="{1}"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:transform&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;!--</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">另一种将参数传递到样式表的方法允许传递所有</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'">请求参数。例如，如果对</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>http://localhost:8080/content.html?param1=value1&amp;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">&nbsp;</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'">）将被传递到样式表。</SPAN><SPAN lang=EN-US> --&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:transform src="transforms/content2html.xsl"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:parameter name="use-request-parameters" value="true"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:transform&gt;<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;!--</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> 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> URL </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参数改变了，即使不由样式表直接使用，也不会使用高速缓存的结果。</SPAN><SPAN lang=EN-US>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:transformers&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:readers default="resource"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:readers&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:serializers default="html"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:serialize type="xml"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:serializer name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/png"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:serializers&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:matchers default="wildcard"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:matchers&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>&lt;/map:components&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:pipelines&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:pipeline&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:match pattern="index.html"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:read src="static/index.html" mime-type="text/html"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/map:match&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;/map:pipeline&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:pipelines&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:pipeline&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:match pattern="*.css"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:read src="styles/{1}.css" mime-type="text/css"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/map:match&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:match pattern="**.html"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:read src="static/{1}.html" mime-type="text/html"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/map:match&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;/map:pipeline&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;!--</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></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></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'">之前声明，否则，它将永远不会被匹配。</SPAN><SPAN lang=EN-US> </SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;!--</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></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;map:pipe&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;map:match pattern="content/*.html"&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;!--</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下一步，添加一个生成器以从</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'">文档：</SPAN><SPAN lang=EN-US>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:generate<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>src="content/{1}.xml"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;!--</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'">文档：</SPAN><SPAN lang=EN-US>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:transform<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>src="transforms/content2html.xsl"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;!--</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'">文档：</SPAN><SPAN lang=EN-US>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>&lt;map:serialize type="html"/&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;/map:match&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:pipe&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>&lt;!--</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> 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'">触发这一管道并使</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'">进行解析，然后在将结果传回浏览器之前使用</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>--&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&lt;/map:sitemap&gt;</SPAN></P>
<P>&nbsp;</P><img src ="http://www.blogjava.net/bibi/aggbug/19460.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-12 13:47 <a href="http://www.blogjava.net/bibi/archive/2005/11/12/19460.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Avalon学习笔记</title><link>http://www.blogjava.net/bibi/archive/2005/11/10/Avalon.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Thu, 10 Nov 2005 14:39:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/10/Avalon.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/19222.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/10/Avalon.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/19222.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/19222.html</trackback:ping><description><![CDATA[<TABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
<TBODY>
<TR>
<TD bgColor=#bbccdd><FONT face=arial,helvetica,sanserif color=#000000 size=+1><B>什么是Avalon?</B></FONT></TD></TR>
<TR>
<TD><FONT face=arial,helvetica,sanserif color=#000000><BR>
<P align=justify><STRONG><FONT size=4>Avalon原意为 </FONT></STRONG>凯尔特族传说中的西方乐土岛,据说亚瑟王及其部下死后尸体被移往该岛。<BR>Avalon是五个子项目的父项目：Framework、Excalibur(亚瑟王的神剑)、LogKit、Phoenix(长生鸟、凤凰)、和Cornerstone(墙角石)。Avalon把重点放在服务器端编程和让以服务器应用为中心的项目的设计和维护变得更容易。Avalon可被描述为一个包含了实现的框架。</P>
<P align=justify>&nbsp;</P></FONT></TD></TR></TBODY></TABLE>
<P>Framework <BR>Avalon Framework是Avalon大伞下的所有其它项目的基础。它定义了接口、契约（contracts）和Avalon的缺省实现。Framework将大部分工作置于其中，因此也是最为成熟的项目。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 框架这个词在应用程序中的含义很广泛。重点放在单一行业的框架被称为垂直市场框架，例如医药系统或通信系统。原因是同样的框架不能胜任其它行业。具有很好通用性，可用于多个行业的框架被称为水平市场框架。Avalon是一个水平市场框架。您可以使用Avalon的Framework构建垂直市场框架。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用Avalon构建的最有说服力的垂直市场框架的例子是Apache Cocoon出版框架。Apache Cocoon第2版是使用Avalon的Framework、Excalibur和LogKit项目构建的。它利用了Framework中的接口和契约，让开发者能用更少的时间理解Cocoon是如何工作的。它也有效地利用了Excalibur提供的数据源管理和组件管理代码，这样它就不必重新发明轮子了。最后，它使用了LogKit来处理出版框架中所有的日志问题。</P>
<P>Excalibur <BR>Avalon Excalibur是一组服务器端组件，您可以在自己的项目中使用它们。它包括了池（pooling）的实现、数据库连接管理和其它一些组件管理的实现。<BR>&nbsp;<BR>LogKit <BR>Avalon LogKit是一个高速日志记录工具集，Framework、Excalibur、Cornerstone和Phoenix都用到它。它的模型与JDK 1.4 Logging package采用相同的原理，但与JDK 1.2+兼容。</P>
<P>Phoenix <BR>Avalon Phoenix是服务器核心，它管理服务（Service，实现为服务器端组件，称作Block）的发布和执行。主要采用了SOP思想[面向服务的编程（Service Oriented Programming ，SOP）的思想是把系统划分为由系统提供的一些服务]。Phoenix把每一种要提供的设施看作是一项服务，由特定接口和相关契约组成。服务的实现被称为Block。一个服务器程序是由多种服务组成的，认识这一点很重要。<BR>&nbsp;<BR>Cornerstone <BR>Avalon Cornerstone是一组Block或服务，这些Block可以布署在Phoenix环境中。这些Block包括了socket管理和Block之间的任务调度。<BR>&nbsp;<BR>Scratchpad <BR>Scratchpad并不是一个真正的正式项目，而是那些还没准备好放入Excalibur中的组件的一个临时区域。这些组件品质差别较大，它们的API也不保证会不变，直到它们被提升到Excalibur项目为止。<BR><BR><BR></P><FONT face=Arial size=4><STRONG>原理和模式<BR></STRONG><FONT size=3>Avalon整个是基于一些特定设计原理来构建的。最重要的两个模式是<EM>反向控制（Inversion of Control）</EM> 和<EM>分离考虑（Separation of Concerns）。</EM> 反向控制（Inversion of Control，IOC）的概念是指组件总是由外部进行管理的。分离考虑（Separation of Concerns，SOC）模式是指不同的思考方向来看待您的系统。分离考虑模式又导致了Aspect Oriented Programming (AOP) 。研究者发现许多考虑不能在类或方法的粒度上进行处理。这些考虑被称为aspect。aspect的例子包括管理对象的生命周期、记日志、处理异常和清理释放资源等。</FONT></FONT><img src ="http://www.blogjava.net/bibi/aggbug/19222.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-10 22:39 <a href="http://www.blogjava.net/bibi/archive/2005/11/10/Avalon.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>近期将学习一下页面流管理方面</title><link>http://www.blogjava.net/bibi/archive/2005/11/10/19200.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Thu, 10 Nov 2005 10:03:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/10/19200.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/19200.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/10/19200.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/19200.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/19200.html</trackback:ping><description><![CDATA[从Avalon、cocoon入手到Struts Flow,然后Spring到Spring Web Flow，当然不能只是应用，要进行部分源代码分析，再对比一下这两种页面流的特点。<img src ="http://www.blogjava.net/bibi/aggbug/19200.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-10 18:03 <a href="http://www.blogjava.net/bibi/archive/2005/11/10/19200.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一个高效简洁的Struts分页方法</title><link>http://www.blogjava.net/bibi/archive/2005/11/09/struts.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Wed, 09 Nov 2005 10:03:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/09/struts.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/19023.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/09/struts.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/19023.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/19023.html</trackback:ping><description><![CDATA[<P>&nbsp;&nbsp;&nbsp; 在网上看了几个Structs分页，感觉不是很完善，于是根据自己的经验，写了一个相对高效简洁的分页方法。由于本人水平有限，如果大家有什么更好的想法，欢迎不吝赐教。 <BR><BR>一、 开发环境 <BR>我的开发环境是：JBuilder x + Weblogic 8.1 + Oracle 9i + Windows 2003 ，如果朋友们的开发环境不一样亦无妨。 <BR><BR>二、开发思路 <BR>既然讲的是Struts，那自然离不了MVC，分页显示也是如此。 <BR>1、 建立数据库和对应的表，本例的表是TCertificate。 <BR>2、 建立适当的模型组件，对应你要查询数据库中的表。这部分由DAO数据访问层来实现，如果有的朋友对DAO不熟悉可以查询一下相关资料。本例由CertificateDAO.java来实现。 <BR>3 、建立分页所需要的模型组件，由javaBean来充当，并与CertificateDAO实现分离。网上介绍的很多方法，都存在着数据与分页组件藕合的现象，这也是本方法与其它分页方法的主要不同之处。 <BR><BR>4、建立控制器组件，这部分由Struts 中的Action来实现。主要负责将实例化CertificateDAO，只取要显示的数据记录，存入ArrayList对象然后返回，并放到request中。而分页部分则根据分页条件，单独进行构造，避免了与DAO混在一起的情况发生。网上其它介绍的一些分页方法中，基本上都是一次性读出所有查询的数据，然后再由分页相关组件进行构造。这样，如果数据量大的话，很容易形成瓶颈。在本例中由于不是一次性地读出查询的所有数据，而只是读出一个页面要显示的数据记录，这就节省了很多不必要的数据传输，提高了效率。本例中为CertificateAction.java。 <BR><BR>5、建立视图组件，这部分由jsp来充当，为了不出现java 代码，我们使用Struts提供的标签库，主要负责从request中取出刚刚放入的对象，通过反复调用CertificateAction以及action参数，而实现分页显示。本例中为listcertificate.jsp。 <BR>6、 建立并配置struts-config.xml。 <BR><BR>三、实例代码 <BR>确定好上面的开发思路后，代码的实现就有单可循了。 <BR>1、建数据库和相应的表。 <BR>2、数据逻辑层的相关代码。 <BR>1）、通用的DAO类：CommonDAO.java <BR>这是一个很多DAO都要继承到的通用DAO类，是我根据实践总结出来的，为了减少篇幅，这里只显示和本例相关的代码。 <BR><BR><BR>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><B>java代码: </B></TD></TR>
<TR>
<TD class=code>
<DIV><BR>package com.xindeco.business ; <BR>import java.io.*; <BR>import java.sql.*; <BR>import java.util.*; <BR>import javax.sql.*; <BR>import java.lang.IllegalAccessException; <BR>import java.lang.reflect.InvocationTargetException; <BR>import org.apache.commons.beanutils.BeanUtils; <BR>public class DAO <BR>{ <BR>&nbsp;&nbsp;protected DataSource ds; <BR>/** <BR>&nbsp;&nbsp;* 说明:取得当前查询的总记录数 <BR>&nbsp;&nbsp;*/ <BR>public int getRows () <BR>{ <BR>&nbsp;&nbsp;return this.count; <BR>} <BR>&nbsp;&nbsp;public void rsHandler (ResultSet rs, int offset, int limit) <BR>&nbsp;&nbsp;{ <BR>&nbsp;&nbsp; try <BR>&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;count = 0; <BR>&nbsp;&nbsp;&nbsp;&nbsp;rs.absolute ( -1) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;count = rs.getRow () ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;if (offset &lt;= 0) <BR>&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp; rs.beforeFirst () ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;else <BR>&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp; rs.absolute (offset) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp; } <BR>&nbsp;&nbsp; catch (Exception e) <BR>&nbsp;&nbsp; { <BR>&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace () ; <BR>&nbsp;&nbsp; } <BR>&nbsp;&nbsp;} <BR>&nbsp;&nbsp;public DAO(DataSource ds) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.ds = ds; <BR>&nbsp;&nbsp;} <BR><BR>&nbsp;&nbsp;public void setDataSource(DataSource ds) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;this.ds = ds; <BR>&nbsp;&nbsp;} <BR><BR>&nbsp;&nbsp;protected void close(ResultSet rs) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;if (rs != null) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rs.close(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (SQLException e) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rs = null; <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;} <BR><BR>&nbsp;&nbsp;protected void close(PreparedStatement pstmt) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;if (pstmt != null) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pstmt.close(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (SQLException e) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pstmt = null; <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;} <BR>&nbsp;&nbsp;protected void close(Connection conn) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;if (conn != null) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conn.close(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (SQLException e) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conn = null; <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;} <BR><BR>&nbsp;&nbsp;protected void rollback(Connection conn) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;if (conn != null) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conn.rollback(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (SQLException e) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conn = null; <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;} <BR>}</DIV></TD></TR></TBODY></TABLE><BR><BR>这个类主要是通过子类传进来的先进结果集，取得查询的记录总数，并对数据库连接进行简单的管理。 <BR>2）、对数据库进行访问：CertificateDAO.java <BR><BR><BR>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><B>java代码: </B></TD></TR>
<TR>
<TD class=code>
<DIV><BR>package com.xindeco.business; <BR><BR>import java.io.*; <BR>import java.sql.*; <BR>import java.util.*; <BR>import javax.sql.*; <BR><BR>import com.xindeco.common.dbconn.DbConn; <BR><BR>public class CertificateDAO extends DAO <BR>{ <BR><BR>&nbsp;&nbsp;public NationDAO(DataSource ds) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;super(ds); <BR>&nbsp;&nbsp;} <BR><BR>public List findCertificateList(int offset,int limit) throws SQLException <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int countRows = 0 ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayList list = null ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;Connection conn = null; <BR>&nbsp;&nbsp;&nbsp;&nbsp;PreparedStatement pstmt = null; <BR>ResultSet rs = null; <BR>try <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conn = ds.getConnection(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String sql = <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"SELECT certificateID, certificateCode,certificateName,photoURL," <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ "description,graduateID FROM TCertificate " ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pstmt = conn.prepareStatement(sql); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rs = pstmt.executeQuery(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*对游标进行处理，rsHandler 方法在父类DAO中*/ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.rsHandler(rs,offset,limit); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (rs != null &amp;&amp; rs.next ()) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list = new ArrayList () ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;countRows++ ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.add (rs2VO (rs)) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while ( (countRows++ &lt; limit) &amp;&amp; rs.next ()) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close(rs); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close(pstmt); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (SQLException e) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close(rs); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close(pstmt); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rollback(conn); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>finally { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close(conn); <BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return list ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private CertificateVO rs2VO (ResultSet rs) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CertificateVO certificateVO = new CertificateVO () ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;certificateVO.setCertificateID (rs.getInt ("certificateID")) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;certificateVO.setCertificateCode (rs.getString ("certificateCode")) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;certificateVO.setCertificateName (rs.getString ("certificateName")) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;certificateVO.setPhotoURL (rs.getString ("photoURL")) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;certificateVO.setDescription (rs.getString ("description")) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;certificateVO.setGraduateID (rs.getInt ("graduateID")) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return certificateVO ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (Exception ex) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ex.printStackTrace () ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return null ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>}</DIV></TD></TR></TBODY></TABLE><BR>findCertificateList(int offset,int limit)是查得所有要显示的数据，并放入ArrayList中。看过网上有些例子，把数据记录放入ArrayList的动作过程直接在while循环体里完成，如果字段多的话，会造成方法过于宠大，又不美观。 这里，数据记录放入ArrayList的动作过程由rs2VO方法完成，就比较整洁了。另外，if (rs != null &amp;&amp; rs.next ()) 配合while ( (countRows++ &lt; limit) &amp;&amp; rs.next ()) 是为了程序的健壮性考虑的，稍分析一下不难得出结论。 <BR><BR>3、建立控制器组件：CertificateAction.java <BR><BR><BR>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><B>java代码: </B></TD></TR>
<TR>
<TD class=code>
<DIV><BR>package com.xindeco.presentation; <BR><BR>import javax.sql.* ; <BR>import java.util.* ; <BR><BR>import javax.servlet.http.* ; <BR>import javax.servlet.* ; <BR><BR>import org.apache.struts.action.* ; <BR>import org.apache.struts.util.* ; <BR><BR>import com.xindeco.common.Pager; <BR>import com.xindeco.business.graduatedata.CertificateDAO ; <BR><BR>public class CertificateAction <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extends Action <BR>{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private static final int PAGE_LENGTH = 5 ; //每页显示5条记录 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public ActionForward execute (ActionMapping mapping, ActionForm form, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpServletRequest request, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpServletResponse response) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ActionForward myforward = null ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String myaction = mapping.getParameter () ; <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (isCancelled (request)) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return mapping.findForward ("failure") ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ("".equalsIgnoreCase (myaction)) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myforward = mapping.findForward ("failure") ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;("LIST".equalsIgnoreCase (myaction)) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myforward = performList (mapping, form, request, response) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myforward = mapping.findForward ("failure") ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return myforward ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private ActionForward performList (ActionMapping mapping, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ActionForm actionForm, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpServletRequest request, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpServletResponse response) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataSource ds = (DataSource) servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY); <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CertificateDAO&nbsp;&nbsp; certificateDAO&nbsp;&nbsp;= new CertificateDAO&nbsp;&nbsp;(ds) ; <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int offset = 0;&nbsp;&nbsp; //翻页时的起始记录所在游标 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int length = PAGE_LENGTH;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String pageOffset = request.getParameter("pager.offset"); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pageOffset == null || pageOffset.equals("")) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset = 0; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset = Integer.parseInt(pageOffset); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List certificateList = certificateDAO .findCertificateList (offset,length) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int size = certificateDAO.getRows(); //&nbsp;&nbsp;取得总记录数 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String url = request.getContextPath()+"/"+mapping.getPath()+".do"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String pagerHeader = Pager.generate(offset, size, length, url); //分页处理 <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;request.setAttribute ("pager", pagerHeader) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;request.setAttribute ("list", certificateList) ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (Exception e) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.printStackTrace(); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return mapping.findForward ("error") ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return mapping.findForward ("success") ; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>}</DIV></TD></TR></TBODY></TABLE><BR><BR>CertificateAction.java主要是把数据从DAO中取出，并放入一个ArrayList 中，然后通过配置文件再软件View的JSP页。 <BR><BR>5、建立视图listcertificate.jsp文件。 <BR><BR>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><B>java代码: </B></TD></TR>
<TR>
<TD class=code>
<DIV><BR>&lt;%@ page contentType="text/html; charset=GBK" %&gt; <BR>&lt;%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %&gt; <BR>&lt;%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %&gt; <BR>&lt;%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %&gt; <BR>&lt;%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %&gt; <BR><BR>&lt;table bgcolor="#666666" cellpadding="1" cellspacing="0" border="0" width="500"&gt; <BR>&lt;tr&gt; <BR>&lt;td&gt; <BR>&lt;table cellpadding="0" cellspacing="0" border="0" width="500"&gt; <BR>&lt;tr&gt; <BR>&lt;td bgcolor="#fecc51"&gt;&amp;&lt;/td&gt; <BR>&lt;/tr&gt; <BR>&lt;/table&gt; <BR>&lt;/td&gt; <BR>&lt;/tr&gt; <BR>&lt;tr&gt; <BR>&lt;td&gt; <BR>&lt;table cellpadding="0" cellspacing="0" border="0" width="500"&gt; <BR>&nbsp;&nbsp;&lt;tr&gt; <BR>&lt;td bgcolor="#d6e0ed"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp;&lt;bean:message key="label.list4certificate"/&gt; <BR>&nbsp;&nbsp;&lt;/td&gt; <BR>&lt;/tr&gt; <BR>&lt;tr bgcolor="#FFFFFF"&gt; <BR>&lt;td width="5%"&gt;&lt;/td&gt;&lt;td width="19%"&gt;&lt;/td&gt;&lt;td width="76%"&gt;&lt;/td&gt; <BR>&lt;/tr&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt; <BR>&lt;td&gt; <BR>&lt;table bgcolor="#f2f2f2" width="500" cellspacing="0" border="0"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr bgcolor="#bacce1"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;b&gt;&lt;bean:message key="Certificate.select"/&gt; &lt;/b&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;b&gt;&lt;bean:message key="Certificate.certificateID"/&gt; &lt;/b&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;b&gt;&lt;bean:message key="Certificate.certificateCode"/&gt;&lt;/b&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;b&gt;&lt;bean:message key="Certificate.certificateName"/&gt;&lt;/b&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;b&gt;&lt;bean:message key="Certificate.view"/&gt;&lt;/b&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;?/tr&gt; <BR><BR>&lt;bean:write name="pager" property="description"/&gt; <BR>&nbsp;&nbsp;&lt;logic:equal name="pager" property="hasPrevious" value="true"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="/graduatedata/list.do?viewPage=&lt;bean:write name="pager" property="previousPage"/&gt;" class="a02"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Previous <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/a&gt; <BR>&nbsp;&nbsp;&lt;/logic:equal&gt; <BR>&nbsp;&nbsp;&lt;logic:equal name="pager" property="hasNext" value="true"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;?a href="/graduatedata/list.do?viewPage=&lt;bean:write name="pager" property="nextPage"/&gt;" class="a02"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp; Next <BR>&nbsp;&nbsp;&nbsp;&nbsp;?/a&gt; <BR>&nbsp;&nbsp;&lt;/logic:equal&gt; <BR><BR>&lt;logic:notEmpty name="list" scope="request"&gt; <BR>&lt;logic:iterate id="certificate" name="list" type="com.xindeco.business.graduatedata.CertificateVO"scope="request"&gt; <BR>&lt;tr bgcolor="#FFFFFF"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;?td&gt;&lt;html:text property="name" value="&lt;bean:write name="certificate" property="certificateID" scope="page"/&gt;"/&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;?td&gt; &lt;bean:write name="certificate" property="certificateID" scope="page"/&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;?td&gt; &lt;bean:write name="certificate" property="certificateCode" scope="page"/&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;?td&gt; &lt;bean:write name="certificate" property="certificateName" scope="page"/&gt;&lt;/td&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;?td&gt; &lt;bean:write name="certificate" property="photoURL" scope="page"/&gt;&lt;/td&gt; <BR>&lt;/tr&gt; <BR>&lt;/logic:iterate&gt; <BR>&lt;/logic:notEmpty&gt; <BR>&lt;/table&gt; <BR>&lt;/td&gt; <BR>&lt;/tr&gt; <BR>&lt;/table&gt; <BR>&lt;/td&gt; <BR>&lt;/tr&gt; <BR>&lt;/table&gt;</DIV></TD></TR></TBODY></TABLE><BR>6、对应的配置文件struts-config.xml。 <BR><BR>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><B>java代码: </B></TD></TR>
<TR>
<TD class=code>
<DIV><BR>&lt;?xml version="1.0" encoding="UTF-8"?&gt; <BR>&lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"&gt; <BR>&lt;struts-config&gt; <BR>&nbsp;&nbsp;&lt;form-beans&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;form-bean name="certificateForm" type="com.xindeco.presentation.graduatedata.CertificateForm" /&gt; <BR>&nbsp;&nbsp;&lt;/form-beans&gt; <BR>&nbsp;&nbsp;&lt;global-forwards&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;forward name="error" path="/error/error.jsp" /&gt; <BR>&nbsp;&nbsp;&lt;/global-forwards&gt; <BR>&nbsp;&nbsp;&lt;action-mappings&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action name="certificateForm" parameter="LIST" path="/graduatedata/list" scope="request" type="com.xindeco.presentation.graduatedata.CertificateAction" validate="true"&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;forward name="success" path="/graduatedata/listcertificate.jsp" /&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/action&gt; <BR>&nbsp;&nbsp;&lt;/action-mappings&gt; <BR>…… <BR>&lt;/struts-config&gt;</DIV></TD></TR></TBODY></TABLE><BR>7、最后当然是最重要的分页代码了：Pager.java <BR><BR>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><B>java代码: </B></TD></TR>
<TR>
<TD class=code>
<DIV><BR>package com.xindeco.common; <BR><BR>import java.util.* ; <BR>public class Pager { <BR>&nbsp;&nbsp;private static int MAX_PAGE_INDEX = 10; //页脚显示多少页 <BR>&nbsp;&nbsp;private static String HEADER = "Result page"; <BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;public static String generate(int offset, int length, int size, String url) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (length &gt; size) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String pref; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (url.indexOf("?") &gt; -1) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pref = "&amp;"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pref = "?"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String header = "&lt;font face='Helvetica' size='-1'&gt;"+HEADER+": "; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (offset &gt; 0) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header += "&amp;&lt;a href=\""+url+pref+"pager.offset="+(offset-size)+"\"&gt;[&lt;&lt; Prev]&lt;/a&gt;\n"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int start; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int radius = MAX_PAGE_INDEX/2*size; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (offset &lt; radius) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start = 0; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if(offset &lt; length-radius) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start = offset - radius; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start = (length/size-MAX_PAGE_INDEX)*size; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(int i=start;i&lt;length &amp;&amp; i &lt; start + MAX_PAGE_INDEX*size;i+=size) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (i == offset) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header += "&lt;b&gt;"+(i/size+1)+"&lt;/b&gt;\n"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header += "&amp;&lt;a href=\""+url+pref+"pager.offset="+i+"\"&gt;"+(i/size+1)+"&lt;/a&gt;\n"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(offset &lt; length - size) { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header += "&amp;&lt;a href=\""+url+pref+"pager.offset="+((int)offset+(int)size)+"\"&gt;[Next &gt;&gt;]&lt;/a&gt;\n"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header += "&lt;/font&gt;"; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return header; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else { <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return ""; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp;&nbsp;} <BR>}</DIV></TD></TR></TBODY></TABLE><BR>这部分代码的实现相当简洁，但已经足够完成所需了。</P><img src ="http://www.blogjava.net/bibi/aggbug/19023.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-09 18:03 <a href="http://www.blogjava.net/bibi/archive/2005/11/09/struts.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>《Spring Web Flow 介绍》PPt文档</title><link>http://www.blogjava.net/bibi/archive/2005/11/09/swf.html</link><dc:creator>鱼上游</dc:creator><author>鱼上游</author><pubDate>Wed, 09 Nov 2005 09:48:00 GMT</pubDate><guid>http://www.blogjava.net/bibi/archive/2005/11/09/swf.html</guid><wfw:comment>http://www.blogjava.net/bibi/comments/19019.html</wfw:comment><comments>http://www.blogjava.net/bibi/archive/2005/11/09/swf.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/bibi/comments/commentRss/19019.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/bibi/services/trackbacks/19019.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; 自己写的一份PPT文档，作为公司内部演示培训用，<A HREF="/Files/bibi/Spring%20Web%20Flow%20介绍.rar">点击下载</A>。<img src ="http://www.blogjava.net/bibi/aggbug/19019.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/bibi/" target="_blank">鱼上游</a> 2005-11-09 17:48 <a href="http://www.blogjava.net/bibi/archive/2005/11/09/swf.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>