??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品无码国产,337P日本欧洲亚洲大胆艺术图,国产精品亚洲精品青青青http://www.tkk7.com/shmily432685/category/4002.htmlzh-cnMon, 08 Oct 2007 04:35:52 GMTMon, 08 Oct 2007 04:35:52 GMT60myeclipse中weblogic服务?/title><link>http://www.tkk7.com/shmily432685/archive/2005/11/26/21511.html</link><dc:creator>闉|</dc:creator><author>闉|</author><pubDate>Sat, 26 Nov 2005 08:11:00 GMT</pubDate><guid>http://www.tkk7.com/shmily432685/archive/2005/11/26/21511.html</guid><wfw:comment>http://www.tkk7.com/shmily432685/comments/21511.html</wfw:comment><comments>http://www.tkk7.com/shmily432685/archive/2005/11/26/21511.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.tkk7.com/shmily432685/comments/commentRss/21511.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/shmily432685/services/trackbacks/21511.html</trackback:ping><description><![CDATA[<H2 class=diaryTitle>myeclipse配置weblogic                                    </H2> <P> <P> <P>weblogic安装参见</P> <P><A >http://zhangstar.blogbus.com/logs/2004/09/413796.html</A></P> <P> <P>MyEclipse默认的应用服务器为JBoss3Q这里我们用WebLogic8.1。启动EclipseQ选择“窗口\首选项”菜单,打开首选项对话框。展开MyEclipse下的Application Serversl点Q点击JBoss 3Q选中右面的Disable单选按钮,停用JBoss 3。然后点击WebLogic 8Q选中双的Enable单选按钮,启用WebLogic服务器。同时下面的配置如下Q?<BR>(1)BEA home directoryQC:\BEA。假定WebLogic安装在D:\BEA文g夹中?<BR>(2)WebLogic installation directoryQC:\BEA\weblogic81?<BR>(3)Admin usernameQ用户名?<BR>(4)Admin passwordQ密码?<BR>(5)Execution domain rootQ安装后Q启动服务的路径?<BR>(6)Execution domain nameQmydomain?<BR>(7)Execution server nameQmyserver?<BR>(8)Hostname:PortNumberQlocalhost:7001?<BR>(9)Security policy fileQD:\BEA\weblogic81\server\lib\weblogic.policy?<BR>(10)JAAS login configuration fileQ省略?<BR>以上配置Ҏ安装情况不同而不同?BR>如图Q?BR><IMG height=529 alt=myeclipse_weblogic.JPG src="http://www.tkk7.com/images/blogjava_net/shmily432685/subject/myeclipse_weblogic.JPG" width=759 border=0><BR>接着展开WebLogic 8l点Q点击JDKQ在双的WLS JDK name处选择WebLogic 8的默认JDK。这里组合框中缺省ؓj2re1.4.2_03Q即之前单独安装的jre。单击Add按钮Q弹出WebLogic > Add JVM对话框,在JRE名称处随便输入一个名字,如jre1.4.1_02。然后在JREȝ录处选择WebLogic安装文g夹中的JDK文g夹,如D:\BEA\jdk141_02Q程序会自动填充Javadoc URL文本框和JREpȝ库列表框。单ȝ定按钮关闭对话框。这时候就可以在WLS JDK namel合框中选择jre1.4.1_02了。之后还要在下面的Optional Java VM argumentsQ如-ms64m -mx64m -Djava.library.path="D:/BEA/weblogic81/server/bin" -Dweblogic.management.discover=false -Dweblogic.ProductionModeEnabled=false <BR>最后点击PathsQ在双的Prepend to classpath列表框中Q通过Add JAR/ZIP按钮Q加入D:\BEA\weblogic81\server\lib\weblogic.jar、D:\BEA\weblogic81\server\lib\webservices.jar。如果用到数据库Q还需把数据库的驱动类库加q来Q这里我们用WebLogic自带的SQL Server数据库驱动库D:\BEA\weblogic81\server\lib\mssqlserver4v65.jar?<BR>xQMyEclipse中WebLogic8的配|工作就完成了。下面可以看看在Eclipse中能否启动WebLogic了?自从安装了MyEclipse之后QEclipse工具栏中׃有一个Run/Stop Servers下拉按钮。点击该按钮的下拉部分,选择“WebLogic 8\Start”菜单,卛_始启动WebLogic了。通过查看下面的控制台消息Q就可以知道启动是否成功Q或有什么异常发生。停止WebLogic可选择“WebLogic\Stop”菜?/P><img src ="http://www.tkk7.com/shmily432685/aggbug/21511.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/shmily432685/" target="_blank">闉|</a> 2005-11-26 16:11 <a href="http://www.tkk7.com/shmily432685/archive/2005/11/26/21511.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>web.xml规则l过整理ȝ如下Q?/title><link>http://www.tkk7.com/shmily432685/archive/2005/11/11/19258.html</link><dc:creator>闉|</dc:creator><author>闉|</author><pubDate>Fri, 11 Nov 2005 02:29:00 GMT</pubDate><guid>http://www.tkk7.com/shmily432685/archive/2005/11/11/19258.html</guid><wfw:comment>http://www.tkk7.com/shmily432685/comments/19258.html</wfw:comment><comments>http://www.tkk7.com/shmily432685/archive/2005/11/11/19258.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/shmily432685/comments/commentRss/19258.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/shmily432685/services/trackbacks/19258.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">1、部|描q符文g像所?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">XML</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">文g一P必须以一?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">XML</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">头开始。这个头声明可以使用?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">XML</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">版本q给出文件的字符~码?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>2、DOCYTPE</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">声明必须立即出现在此头之后。这个声明告诉服务器适用?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">规范的版本(?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">2.2</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">2.3</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Qƈ指定理此文件其余部分内容的语法?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">DTD(Document Type Definition</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Q文档类型定?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">)</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR></SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">所有部|描q符文g的顶层(根)元素?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">web-app</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">。请注意Q?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">XML</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素不像</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">HTML</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Q他们是大小写敏感的。因此,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">web-App</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">WEB-APP</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">都是不合法的Q?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">web-app</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">必须用小写?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><?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"><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN> <SPAN style="COLOR: #000000"><?</SPAN><SPAN style="COLOR: #000000">xml version</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">1.0</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> encoding</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">UTF-8</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">?></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">2</SPAN> <SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">3</SPAN> <SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">web</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">app xmlns</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">http://java.sun.com/xml/ns/j2ee</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> xmlns:xsi</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">http://www.w3.org/2001/XMLSchema-instance</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> version</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">2.4</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> xsi:schemaLocation</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">4</SPAN> <SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">5</SPAN> <SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #000000"></</SPAN><SPAN style="COLOR: #000000">web</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">app</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">6</SPAN> <SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">7</SPAN> <SPAN style="COLOR: #000000"></SPAN></DIV> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">2?</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">部v描述W文件内的元素次?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 22pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">XML </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素不仅是大写敏感的,而且它们q对出现在其他元素中的次序敏感?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 22pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">XML</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">头必L文g中的W一,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">DOCTYPE</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">声明必须是第二项Q?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">web- app</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素必须是第三项。在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">web-app</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素内,元素的次序也很重要。服务器不一定强制要求这U次序,但它们允许(实际上有些服务器是q样做的Q完全拒l执行含有次序不正确的元素的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Web</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">应用。这表示使用非标准元素次序的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">web.xml</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">文g是不可移植的?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 22pt; mso-char-indent-count: 2.0"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">下面的列表给Z所有可直接出现?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">web-app</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素内的合法元素所必需的次序?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 22pt; mso-char-indent-count: 2.0"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">此列表说?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素必须出现在所?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet-mapping</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素之前。请注意Q所有这些元素都是可选的。因此,可以省略掉某一元素Q但不能把它放于不正的位置?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l icon icon</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素指出</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">IDE</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">GUI</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">工具用来表示</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Web</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">应用的一个和两个囑փ文g的位|?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l display-name display-name</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素提供</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">GUI</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">工具可能会用来标记这个特定的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Web</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">应用的一个名U?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l description description</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素l出与此有关的说明性文本?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l context-param context-param</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素声明应用范围内的初始化参数?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l filter </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">qo器元素将一个名字与一个实?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">javax.servlet.Filter</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">接口的类相关联?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l filter-mapping </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">一旦命名了一个过滤器Q就要利?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">filter-mapping</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素把它与一个或多个</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">JSP</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">面相关联?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l listener servlet API</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">的版?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">2.3</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">增加了对事g监听E序的支持,事g监听E序在徏立、修改和删除会话?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">环境时得到通知?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Listener</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素指出事g监听E序cR?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l servlet </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">在向</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">JSP</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">面制定初始化参数或定制</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">URL</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Ӟ必须首先命名</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">JSP</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">面?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素是用来完成此项d的?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l servlet-mapping </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">服务器一般ؓ</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">提供一个缺省的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">URL</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Q?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><A href="http://host/webAppPrefix/servlet/ServletName。但是,常常会更改这个URLQ以便servlet可以讉K初始化参数或更容易地处理相对URL。在更改~省URLӞ使用servlet-mapping元素? target=_blank>http://host/webAppPrefix/servlet/ServletName<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><SPAN lang=EN-US>。但是,常常会更改这?/SPAN></SPAN>URL<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><SPAN lang=EN-US>Q以?/SPAN></SPAN>servlet<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><SPAN lang=EN-US>可以讉K初始化参数或更容易地处理相对</SPAN></SPAN>URL<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><SPAN lang=EN-US>。在更改~省</SPAN></SPAN>URL<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><SPAN lang=EN-US>Ӟ使用</SPAN></SPAN>servlet-mapping<SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><SPAN lang=EN-US>元素?/SPAN></SPAN></A><BR>l session-config </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">如果某个会话在一定时间内未被讉KQ服务器可以抛弃它以节省内存。可通过使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">HttpSession</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">setMaxInactiveInterval</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Ҏ明确讄单个会话对象的超时|或者可利用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">session-config</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素制定~省时倹{?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l mime-mapping </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">如果</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Web</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">应用h惛_Ҏ的文Ӟ希望能保证给他们分配特定?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">MIME</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">cdQ则</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">mime-mapping</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素提供q种保证?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l welcom-file-list welcome-file-list</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素指示服务器在收到引用一个目录名而不是文件名?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">URL</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Ӟ使用哪个文g?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l error-page error-page</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素使得在返回特?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">HTTP</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">状态代码时Q或者特定类型的异常被抛出时Q能够制定将要显C的面?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l taglib taglib</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素Ҏ记库描述W文Ӟ</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Tag Libraryu Descriptor file</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">Q指定别名。此功能使你能够更改</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">TLD</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">文g的位|,而不用编辑用这些文件的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">JSP</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">面?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l resource-env-ref resource-env-ref</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素声明与资源相关的一个管理对象?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l resource-ref resource-ref</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素声明一个资源工厂用的外部资源?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l security-constraint security-constraint</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素制定应该保护?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">URL</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">。它?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">login-config</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素联合使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l login-config </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">login-config</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素来指定服务器应该怎样l试图访问受保护面的用h权。它?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">sercurity-constraint</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素联合使用?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l security-role security-role</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素l出安全角色的一个列表,q些角色出现在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">servlet</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素内的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">security-role-ref</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">role-name</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">子元素中。分别地声明角色可高</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">IDE</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">处理安全信息更ؓҎ?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l env-entry env-entry</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素声明</SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">Web</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">应用的环境项?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l ejb-ref ejb-ref</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素声明一?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">EJB</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">的主目录的引用?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><BR>l ejb-local-ref ejb-local-ref</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">元素声明一?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana">EJB</SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">的本C目录的应用?BR>3?/SPAN></P><img src ="http://www.tkk7.com/shmily432685/aggbug/19258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/shmily432685/" target="_blank">闉|</a> 2005-11-11 10:29 <a href="http://www.tkk7.com/shmily432685/archive/2005/11/11/19258.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>集成 Struts、Tiles ?JavaServer Faceshttp://www.tkk7.com/shmily432685/archive/2005/11/10/19073.html闉|闉|Wed, 09 Nov 2005 16:19:00 GMThttp://www.tkk7.com/shmily432685/archive/2005/11/10/19073.htmlhttp://www.tkk7.com/shmily432685/comments/19073.htmlhttp://www.tkk7.com/shmily432685/archive/2005/11/10/19073.html#Feedback0http://www.tkk7.com/shmily432685/comments/commentRss/19073.htmlhttp://www.tkk7.com/shmily432685/services/trackbacks/19073.html阅读全文

闉| 2005-11-10 00:19 发表评论
]]>
使用 Spring 更好地处?Struts 动作 三种整合 Struts 应用E序?Spring 的方?/title><link>http://www.tkk7.com/shmily432685/archive/2005/11/09/19069.html</link><dc:creator>闉|</dc:creator><author>闉|</author><pubDate>Wed, 09 Nov 2005 15:53:00 GMT</pubDate><guid>http://www.tkk7.com/shmily432685/archive/2005/11/09/19069.html</guid><wfw:comment>http://www.tkk7.com/shmily432685/comments/19069.html</wfw:comment><comments>http://www.tkk7.com/shmily432685/archive/2005/11/09/19069.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/shmily432685/comments/commentRss/19069.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/shmily432685/services/trackbacks/19069.html</trackback:ping><description><![CDATA[<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR vAlign=top> <TD width="100%"></TD> <TD class=no-print width=192></TD></TR></TBODY></TABLE> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR vAlign=top> <TD width=10><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=10></TD> <TD width="100%"> <TABLE class=no-print cellSpacing=0 cellPadding=0 width=160 align=right border=0> <TBODY> <TR> <TD width=10><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=10></TD> <TD> <TABLE cellSpacing=0 cellPadding=0 width=150 border=0> <TBODY> <TR> <TD class=v14-header-1-small></TD></TR></TBODY></TABLE> <TABLE class=v14-gray-table-border cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD class=no-padding width=150> <TABLE cellSpacing=0 cellPadding=0 width=143 border=0><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=8> <FORM name=email action=https://www-130.ibm.com/developerworks/secure/email-it.jsp> <SCRIPT language=JavaScript type=text/javascript> <!-- document.write('<tr valign="top"><td width="8"><img src="http://www.ibm.com/i/c.gif" width="8" height="1" alt=""/></td><td width="16"><img src="http://www.ibm.com/i/v14/icons/em.gif" height="16" width="16" vspace="3" alt="此作为电子邮件发? /></td><td width="122"><p><a class="smallplainlink" href="javascript:document.email.submit();"><b>此作为电子邮件发?/b></a></p></td></tr>'); //--> </SCRIPT>   <TBODY> <TR vAlign=top> <TD width=8><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=8></TD> <TD width=16></TD> <TD width=122></TD></TR><NOSCRIPT><tr valign="top"><td width="8"><img src="http://www.ibm.com/i/c.gif" width="8" height="1" alt="" /></td><td width="16"><img src="http://www.ibm.com/i/c.gif" height="16" width="16" alt="" /></td><td width="122" class="small"><p><span id="6666661" class="ast">未显C需?JavaScript 的文档选项</span></p></td></tr></NOSCRIPT></FORM> <TR vAlign=top> <TD width=8><FONT face=Verdana color=#5c81a7 size=2><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=8></FONT></TD> <TD width=16><FONT face=Verdana color=#5c81a7 size=2></FONT></TD> <TD width=122> <P> </P></TD></TR> <TR vAlign=top> <TD width=8><FONT face=Verdana color=#5c81a7 size=2><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=8></FONT></TD> <TD width=16><FONT face=Verdana color=#5c81a7 size=2></FONT></TD> <TD width=122> <P><A class=smallplainlink ><B><FONT face=Verdana color=#996699 size=2></FONT></B></A> </P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR> <TABLE cellSpacing=0 cellPadding=0 width=150 border=0> <TBODY> <TR> <TD class=v14-header-1-small></TD></TR></TBODY></TABLE> <TABLE class=v14-gray-table-border cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD class=no-padding width=150> <TABLE cellSpacing=0 cellPadding=0 width=143 border=0> <TBODY> <TR vAlign=top> <TD width=8><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=8></TD> <TD></TD> <TD width=125></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR></TD></TR></TBODY></TABLE> <P>U别: 中</P> <P><A ><FONT color=#996699>George Franciscus </FONT></A>, 负责? Nexcel<BR></P> <P>2005 q?11 ?03 ?/P> <BLOCKQUOTE><I>Struts Recipes</I> 的合著?George Franciscus 介l另一个重大的 Struts 整合H门 —?q次是将 Struts 应用E序导入 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架。请跟随 GeorgeQ他向您展C如何改?Struts 动作Q得管?Struts 动作像理 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> beans 那样。结果是一个增强的 web 框架Q这个框架可以方便地利用 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> AOP 的优ѝ?/BLOCKQUOTE> <P>您肯定已l听说过控制反{ (IOC) 设计模式Q因为很长一D|间以来一直在传关于它的信息。如果您在Q何功能中使用q?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架Q那么您q道其原理的作用。在本文中,我利用这一原理把一?Struts 应用E序注入 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架Q您亲w体会到 IOC 模式的强大?/P> <P>一?Struts 应用E序整合q?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架h多方面的优点。首先,Spring 是ؓ解决一些关?JEE 的真实世界问题而设计的Q比如复杂性、低性能和可试性,{等。第二,Spring 框架包含一?AOP 实现Q允许您面向方面技术应用于面向对象的代码。第三,一些h可能会说 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架只有<I>处理</I> Struts ?Struts 处理自己好。但是这是观炚w题,我演CZU将 Struts 应用E序整合?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架的方法后Q具体由您自己决定用哪一U?/P> <P>我所演示的方法都是执行v来相对简单的Q但是它们却h明显不同的优炏V我为每一U方法创Z一个独立而可用的例子Q这h可以完全理解每U方法。请参阅 <A ><FONT color=#996699>下蝲</FONT></A> 部分获得完整例子源代码。请参阅 <A ><FONT color=#996699>参考资?/FONT></A>Q下?Struts MVC ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架?/P> <P><A name=IDAFEWW><span id="1166616" class=atitle><STRONG><FONT size=4>Z?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> q么了不P</FONT></STRONG></SPAN></A></P> <P><a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的创立?Rod Johnson 以一U批判的眼光看待 Java?企业软g开发,q且提议很多企业N都能够通过战略C?IOC 模式Q也UC依赖注入Q来解决。当 Rod 和一个具有奉献精的开放源码开发者团队将q个理论应用于实跉|Q结果就产生?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架。简a之,Spring 是一个轻型的容器Q利用它可以使用一个外?XML 配置文g方便地将对象q接在一赗每个对象都可以通过昄一?JavaBean 属性收C个到依赖对象的引用,留给您的单Q务就只是在一?XML 配置文g中把它们q接好?/P> <TABLE cellSpacing=0 cellPadding=0 width="40%" align=right border=0> <TBODY> <TR> <TD width=10><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=10></TD> <TD> <TABLE cellSpacing=0 cellPadding=5 width="100%" border=1> <TBODY> <TR> <TD bgColor=#eeeeee><A name=IDAMEWW><B>IOC ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a></B></A><BR> <P>IOC 是一U应用E序逻辑外在化的设计模式Q所以它是被注入而不是被写入客户Z码中。将 IOC 与接口编E应用结合,像 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架那样Q生了一U架构,q种架构能够减少客户机对特定实现逻辑的依赖。请参阅 <A ><FONT color=#996699>参考资?/FONT></A> 了解更多关于 IOC ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的信息?/P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> <P>依赖注入是一个强大的Ҏ,但是 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架能够提供更多Ҏ。Spring 支持可插拔的事务理器,可以l您的事务处理提供更q泛的选择范围。它集成了领先的持久性框Ӟq且提供一个一致的异常层次l构。Spring q提供了一U用面向方面代码代替正常的面向对象代码的简单机制?/P> <P><a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> AOP 允许您?I>拦截?/I> 在一个或多个执行点上拦截应用E序逻辑。加强应用程序在拦截器中的日志记录逻辑会生一个更可读的、实用的代码基础Q所以拦截器q泛用于日志记录。您很快׃看到Qؓ了处理横切关注点QSpring AOP 发布了它自己的拦截器Q您也可以编写您自己的拦截器?/P><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDA2EWW><span id="6116116" class=atitle><STRONG><FONT size=4>整合 Struts ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a></FONT></STRONG></SPAN></A></P> <P>?Struts 怼QSpring 可以作ؓ一?MVC 实现。这两种框架都具有自q优点和缺点,管大部分h同意 Struts ?MVC 斚w仍然是最好的。很多开发团队已l学会在旉紧迫的时候利?Struts 作ؓ构造高品质软g的基。Struts h如此大的推动力,以至于开发团队宁愿整?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架的特性,而不愿意转换?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> MVC。没必要q行转换Ҏ来说是一个好消息。Spring 架构允许您将 Struts 作ؓ Web 框架q接到基?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的业务和持久层。最后的l果是现在一切条仉具备了?/P> <P>在接下来的小H门中,您将会了解到三种?Struts MVC 整合?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架的方法。我揭C每U方法的~陷q且Ҏ它们的优炏V?一旦您了解到所有三U方法的作用Q我会向您展示一个o人兴奋的应用E序Q这个程序用的是这三种Ҏ中我最喜欢的一U?/P><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDADFWW><span id="6116111" class=atitle><STRONG><FONT size=4>三个窍?/FONT></STRONG></SPAN></A></P> <P>接下来的每种整合技术(或者窍门)都有自己的优点和特点。我偏爱其中的一U,但是我知道这三种都能够加深您?Struts ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的理解。在处理各种不同情况的时候,q将l您提供一个广阔的选择范围。方法如下:</P> <UL> <LI>使用 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?<CODE><FONT face=Courier size=2>ActionSupport</FONT></CODE> cL?Structs <LI>使用 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?<CODE><FONT face=Courier size=2>DelegatingRequestProcessor</FONT></CODE> 覆盖 Struts ?<CODE><FONT face=Courier size=2>RequestProcessor </FONT></CODE> <LI>?Struts <CODE><FONT face=Courier size=2>Action</FONT></CODE> 理委托l?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架</LI></UL> <P><A name=IDAAGWW><span id="6111616" class=smalltitle><STRONG>装蝲应用E序环境</STRONG></SPAN></A></P> <P>无论您用哪U技术,都需要?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?<CODE><FONT face=Courier size=2>ContextLoaderPlugin</FONT></CODE> ?Struts ?<CODE><FONT face=Courier size=2>ActionServlet</FONT></CODE> 装蝲 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 应用E序环境。就像添加Q何其他插件一P单地向您?struts-config.xml 文gd该插Ӟ如下所C:</P> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console"><plug-in className= "org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property= "contextConfigLocation" value="/WEB-INF/beans.xml"/> </plug-in> </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>前面已经提到q,?<A ><FONT color=#996699>下蝲</FONT></A> 部分Q您能够扑ֈq三个完全可使用的例子的完整源代码。每个例子都Z个书c搜索应用程序提供一U不同的 Struts ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的整合方法。您可以在这里看C子的要点Q但是您也可以下载应用程序以查看所有的l节?/P><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDAZGWW><span id="1661616" class=atitle><STRONG><FONT size=4>H门 1. 使用 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?ActionSupport</FONT></STRONG></SPAN></A></P> <P>手动创徏一?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 环境是一U整?Struts ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的最直观的方式。ؓ了它变得更单,Spring 提供了一些帮助。ؓ了方便地获得 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 环境Q?CODE><FONT face=Courier size=2>org.springframework.web.struts.ActionSupport</FONT></CODE> cL供了一?<CODE><FONT face=Courier size=2>getWebApplicationContext()</FONT></CODE> Ҏ。您所做的只是?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?<CODE><FONT face=Courier size=2>ActionSupport</FONT></CODE> 而不?Struts <CODE><FONT face=Courier size=2>Action</FONT></CODE> cL展您的动作,如清?1 所C:</P><BR><A name=IDAUHWW><B>清单 1. 使用 ActionSupport 整合 Struts</B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console">package ca.nexcel.books.actions; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.DynaActionForm; import org.springframework.context.ApplicationContext; import org.springframework.web.struts.ActionSupport; import ca.nexcel.books.beans.Book; import ca.nexcel.books.business.BookService; public class SearchSubmit extends ActionSupport { <span id="6611161" class=boldcode><STRONG>|(1)</STRONG></SPAN> public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { DynaActionForm searchForm = (DynaActionForm) form; String isbn = (String) searchForm.get("isbn"); //the old fashion way //BookService bookService = new BookServiceImpl(); ApplicationContext ctx = getWebApplicationContext(); <span id="1166611" class=boldcode><STRONG>|(2)</STRONG></SPAN> BookService bookService = (BookService) ctx.getBean("bookService"); <span id="1666161" class=boldcode><STRONG>|(3)</STRONG></SPAN> Book book = bookService.read(isbn.trim()); if (null == book) { ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR,new ActionError ("message.notfound")); saveErrors(request, errors); return mapping.findForward("failure") ; } request.setAttribute("book", book); return mapping.findForward("success"); } } </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>让我们快速思考一下这里到底发生了什么。在 (1) 处,我通过?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?<CODE><FONT face=Courier size=2>ActionSupport</FONT></CODE> c而不?Struts ?<CODE><FONT face=Courier size=2>Action</FONT></CODE> c进行扩展,创徏了一个新?<CODE><FONT face=Courier size=2>Action</FONT></CODE>。在 (2) 处,我?<CODE><FONT face=Courier size=2>getWebApplicationContext()</FONT></CODE> Ҏ获得一?<CODE><FONT face=Courier size=2>ApplicationContext</FONT></CODE>。ؓ了获得业务服务,我用在 (2) 处获得的环境?(3) 处查找一?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> bean?/P> <P>q种技术很单ƈ且易于理解。不q的是,它将 Struts 动作?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架耦合在一赗如果您x换掉 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a>Q那么您必须重写代码。ƈ且,׃ Struts 动作不在 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的控制之下,所以它不能获得 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> AOP 的优ѝ当使用多重独立?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 环境Ӟq种技术可能有用,但是在大多数情况下,q种Ҏ不如另外两种Ҏ合适?/P><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDA0A4W><span id="6611116" class=atitle><STRONG><FONT size=4>H门 2. 覆盖 RequestProcessor</FONT></STRONG></SPAN></A></P> <P>?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?Struts 动作中分L一个更巧妙的设计选择。分ȝ一U方法是使用 <CODE><FONT face=Courier size=2>org.springframework.web.struts.DelegatingRequestProcessor</FONT></CODE> cL覆盖 Struts ?<CODE><FONT face=Courier size=2>RequestProcessor</FONT></CODE> 处理E序Q如清单 2 所C:</P><BR><A name=IDANB4W><B>清单 2. 通过 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?DelegatingRequestProcessor q行整合</B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console"><?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <form-beans> <form-bean name="searchForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="isbn" type="java.lang.String"/> </form-bean> </form-beans> <global-forwards type="org.apache.struts.action.ActionForward"> <forward name="welcome" path="/welcome.do"/> <forward name="searchEntry" path="/searchEntry.do"/> <forward name="searchSubmit" path="/searchSubmit.do"/> </global-forwards> <action-mappings> <action path="/welcome" forward="/WEB-INF/pages/welcome.htm"/> <action path="/searchEntry" forward="/WEB-INF/pages/search.jsp"/> <action path="/searchSubmit" type="ca.nexcel.books.actions.SearchSubmit" input="/searchEntry.do" validate="true" name="searchForm"> <forward name="success" path="/WEB-INF/pages/detail.jsp"/> <forward name="failure" path="/WEB-INF/pages/search.jsp"/> </action> </action-mappings> <message-resources parameter="ApplicationResources"/> <controller processorClass="org.springframework.web.struts. DelegatingRequestProcessor"/> <span id="1116666" class=boldcode><STRONG>|(1)</STRONG></SPAN> <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> </plug-in> <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="csntextConfigLocation" value="/WEB-INF/beans.xml"/> </plug-in> </struts-config> </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>我利用了 <CODE><FONT face=Courier size=2><controller></FONT></CODE> 标记来用 <CODE><FONT face=Courier size=2>DelegatingRequestProcessor</FONT></CODE> 覆盖默认?Struts <CODE><FONT face=Courier size=2>RequestProcessor</FONT></CODE>。下一步是在我?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 配置文g中注册该动作Q如清单 3 所C:</P><BR><A name=IDAGC4W><B>清单 3. ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 配置文g中注册一个动?/B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console"><?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="bookService" class="ca.nexcel.books.business.BookServiceImpl"/> <bean name="/searchSubmit" class="ca.nexcel.books.actions.SearchSubmit"> <span id="1666661" class=boldcode><STRONG>|(1)</STRONG></SPAN> <property name="bookService"> <ref bean="bookService"/> </property> </bean> </beans> </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>注意Q在 (1) 处,我用名U属性注册了一?beanQ以匚w struts-config 动作映射名称?CODE><FONT face=Courier size=2>SearchSubmit</FONT></CODE> 动作揭示了一?JavaBean 属性,允许 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 在运行时填充属性,如清?4 所C:</P><BR><A name=IDAXC4W><B>清单 4. h JavaBean 属性的 Struts 动作</B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console">package ca.nexcel.books.actions; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.DynaActionForm; import ca.nexcel.books.beans.Book; import ca.nexcel.books.business.BookService; public class SearchSubmit extends Action { private BookService bookService; public BookService getBookService() { return bookService; } public void setBookService(BookService bookService) { <span id="1116166" class=boldcode><STRONG>| (1)</STRONG></SPAN> this.bookService = bookService; } public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { DynaActionForm searchForm = (DynaActionForm) form; String isbn = (String) searchForm.get("isbn"); Book book = getBookService().read(isbn.trim()); <span id="6611611" class=boldcode><STRONG>|(2)</STRONG></SPAN> if (null == book) { ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("message.notfound")); saveErrors(request, errors); return mapping.findForward("failure") ; } request.setAttribute("book", book); return mapping.findForward("success"); } } </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>在清?4 中,您可以了解到如何创徏 Struts 动作。在 (1) 处,我创Z一?JavaBean 属性?CODE><FONT face=Courier size=2>DelegatingRequestProcessor</FONT></CODE>自动地配|这U属性。这U设计 Struts 动作q不知道它正?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 理Qƈ且您能够利?Sping 的动作管理框架的所有优炏V由于您?Struts 动作注意不到 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的存在,所以您不需要重写您?Struts 代码可以用其他控制反转容器来替换?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a>?/P> <P><CODE><FONT face=Courier size=2>DelegatingRequestProcessor</FONT></CODE> Ҏ的确比第一U方法好Q但是仍然存在一些问题。如果您使用一个不同的 <CODE><FONT face=Courier size=2>RequestProcessor</FONT></CODE>Q则需要手动整?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?<CODE><FONT face=Courier size=2>DelegatingRequestProcessor</FONT></CODE>。添加的代码会造成l护的麻烦ƈ且将来会降低您的应用E序的灵zL。此外,q有q一些用一pd命o来代?Struts <CODE><FONT face=Courier size=2>RequestProcessor</FONT></CODE> 的传闅R?q种改变会对这U解x法的使用寿命造成负面的媄响?/P><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDAYD4W><span id="6161616" class=atitle><STRONG><FONT size=4>H门 3. 动作管理委托给 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a></FONT></STRONG></SPAN></A></P> <P>一个更好的解决Ҏ是将 Strut 动作理委托l?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a>。您可以通过?<CODE><FONT face=Courier size=2>struts-config</FONT></CODE> 动作映射中注册一个代理来实现。代理负责在 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 环境中查?Struts 动作。由于动作在 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的控制之下,所以它可以填充动作?JavaBean 属性,qؓ应用诸如 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?AOP 拦截器之cȝҎ带来了可能?</P> <P>清单 5 中的 <CODE><FONT face=Courier size=2>Action</FONT></CODE> cM清单 4 中的相同。但?struts-config 有一些不同:</P><BR><A name=IDANE4W><B>清单 5. <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 整合的委托方?/B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console"><?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <form-beans> <form-bean name="searchForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="isbn" type="java.lang.String"/> </form-bean> </form-beans> <global-forwards type="org.apache.struts.action.ActionForward"> <forward name="welcome" path="/welcome.do"/> <forward name="searchEntry" path="/searchEntry.do"/> <forward name="searchSubmit" path="/searchSubmit.do"/> </global-forwards> <action-mappings> <action path="/welcome" forward="/WEB-INF/pages/welcome.htm"/> <action path="/searchEntry" forward="/WEB-INF/pages/search.jsp"/> <action path="/searchSubmit" type="org.springframework.web.struts.DelegatingActionProxy" <span id="1116166" class=boldcode><STRONG>|(1)</STRONG></SPAN> input="/searchEntry.do" validate="true" name="searchForm"> <forward name="success" path="/WEB-INF/pages/detail.jsp"/> <forward name="failure" path="/WEB-INF/pages/search.jsp"/> </action> </action-mappings> <message-resources parameter="ApplicationResources"/> <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> </plug-in> <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="/WEB-INF/beans.xml"/> </plug-in> </struts-config> </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>清单 5 是一个典型的 struts-config.xml 文gQ只有一个小的差别。它注册 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 代理cȝ名称Q而不是声明动作的cdQ如Q?Q处所C。DelegatingActionProxy cM用动作映名U查?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 环境中的动作。这是我们使用 <CODE><FONT face=Courier size=2>ContextLoaderPlugIn</FONT></CODE> 声明的环境?/P> <P>一?Struts 动作注册Z?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> bean 是非常直观的Q如清单 6 所C。我利用动作映射使用 <CODE><FONT face=Courier size=2><bean></FONT></CODE> 标记的名U属性(在这个例子中?"<CODE><FONT face=Courier size=2>/searchSubmit</FONT></CODE>"Q简单地创徏了一?bean。这个动作的 JavaBean 属性像M <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> bean 一栯填充Q?</P><BR><A name=IDAIF4W><B>清单 6. ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 环境中注册一?Struts 动作</B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console"><?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="bookService" class="ca.nexcel.books.business.BookServiceImpl"/> <bean name="/searchSubmit" class="ca.nexcel.books.actions.SearchSubmit"> <property name="bookService"> <ref bean="bookService"/> </property> </bean> </beans> </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><FONT face="Lucida Console"><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></FONT></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><FONT face="Lucida Console"><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></FONT></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDAOF4W><span id="6666161" class=atitle><STRONG><FONT size=4>动作委托的优?/FONT></STRONG></SPAN></A></P> <P>动作委托解决Ҏ是这三种Ҏ中最好的。Struts 动作不了?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a>Q不对代码作M改变可用于?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 应用E序中?CODE><FONT face=Courier size=2>RequestProcessor</FONT></CODE> 的改变不会媄响它Qƈ且它可以利用 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> AOP Ҏ的优点?</P> <P>动作委托的优点不止如此。一旦让 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 控制您的 Struts 动作Q您可以?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> l动作补充更强的zd。例如,没有 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的话Q所有的 Struts 动作都必LU程安全的。如果您讄 <CODE><FONT face=Courier size=2><bean></FONT></CODE> 标记?singleton 属性ؓ“false”,那么不管用何U方法,您的应用E序都将在每一个请求上有一个新生成的动作对象。您可能不需要这U特性,但是把它攑֜您的工具׃也很好。您也可以利?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的生命周期方法。例如,当实例化 Struts 动作Ӟ<CODE><FONT face=Courier size=2><bean></FONT></CODE> 标记?init-method 属性被用于q行一个方法。类似地Q在从容器中删除 bean 之前Qdestroy-method 属性执行一个方法。这些方法是理昂贵对象的好办法Q它们以一U与 Servlet 生命周期相同的方式进行管理?/P><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDAEG4W><span id="1166111" class=atitle><STRONG><FONT size=4>拦截 Struts</FONT></STRONG></SPAN></A></P> <P>前面提到q,通过?Struts 动作委托l?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架而整?Struts ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的一个主要的优点是:您可以将 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?AOP 拦截器应用于您的 Struts 动作。通过?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 拦截器应用于 Struts 动作Q您可以用最的代h处理横切x炏V?/P> <P>虽然 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 提供很多内置拦截器,但是我将向您展示如何创徏自己的拦截器q把它应用于一?Struts 动作。ؓ了用拦截器Q您需要做三g事:</P> <OL> <LI>创徏拦截器? <LI>注册拦截器? <LI>声明在何处拦截代码?/LI></OL> <P>q看h非常单的几句话却非常强大。例如,在清?7 中,我ؓ Struts 动作创徏了一个日志记录拦截器?q个拦截器在每个Ҏ调用之前打印一句话Q?/P><BR><A name=IDAUG4W><B>清单 7. 一个简单的日志记录拦截?/B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console">package ca.nexcel.books.interceptors; import org.springframework.aop.MethodBeforeAdvice; import java.lang.reflect.Method; public class LoggingInterceptor implements MethodBeforeAdvice { public void before(Method method, Object[] objects, Object o) throws Throwable { System.out.println("logging before!"); } } </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>q个拦截器非常简单?CODE><FONT face=Courier size=2>before()</FONT></CODE> Ҏ在拦截点中每个方法之前运行。在本例中,它打印出一句话Q其实它可以做您惛_的Q何事。下一步就是在 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 配置文g中注册这个拦截器Q如清单 8 所C:</P><BR><A name=IDADH4W><B>清单 8. ?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 配置文g中注册拦截器</B></A><BR> <TABLE cellSpacing=0 cellPadding=5 width="100%" bgColor=#eeeeee border=1> <TBODY> <TR> <TD><PRE><CODE class=section> <FONT face="Lucida Console"><?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="bookService" class="ca.nexcel.books.business.BookServiceImpl"/> <bean name="/searchSubmit" class="ca.nexcel.books.actions.SearchSubmit"> <property name="bookService"> <ref bean="bookService"/> </property> </bean> <!-- Interceptors --> <bean name="logger" class="ca.nexcel.books.interceptors.LoggingInterceptor"/> <span id="1166611" class=boldcode><STRONG>|(1)</STRONG></SPAN> <!-- AutoProxies --> <bean name="loggingAutoProxy" class="org.springframework.aop.framework.autoproxy. BeanNameAutoProxyCreator"> <span id="1161116" class=boldcode><STRONG>|(2)</STRONG></SPAN> <property name="beanNames"> <value>/searchSubmit</valuesgt; <span id="1116666" class=boldcode><STRONG>|(3)</STRONG></SPAN> </property> <property name="interceptorNames"> <list> <value>logger</value> <span id="1611661" class=boldcode><STRONG>|(4)</STRONG></SPAN> </list> </property> </bean> </beans> </FONT></CODE></PRE></TD></TR></TBODY></TABLE><BR> <P>您可能已l注意到了,清单 8 扩展?<A ><FONT color=#996699>清单 6</FONT></A> 中所C的应用E序以包含一个拦截器。具体细节如下:</P> <UL> <LI>?(1) 处,我注册了q个拦截器? <LI>?(2) 处,我创Z一?bean 名称自动代理Q它描述如何应用拦截器。还有其他的Ҏ定义拦截点,但是q种Ҏ常见而简ѝ? <LI>?(3) 处,我将 Struts 动作注册为将被拦截的 bean。如果您惌拦截其他?Struts 动作Q则只需要在 "beanNames" 下面创徏附加?<CODE><FONT face=Courier size=2><value></FONT></CODE> 标记? <LI>?(4) 处,当拦截发生时Q我执行了在 (1) 处创建的拦截?bean 的名U。这里列出的所有拦截器都应用于“beanNames”?/LI></UL> <P>是q样。就像这个例子所展示的,您?Struts 动作|于 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架的控制之下,为处理您?Struts 应用E序提供了一pd全新的选择。在本例中,使用动作委托可以L地利?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 拦截器提?Struts 应用E序中的日志记录能力?/P><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=IDAFI4W><span id="6616611" class=atitle><STRONG><FONT size=4>l束?/FONT></STRONG></SPAN></A></P> <P>在本文中Q您已经学习了将 Struts 动作整合?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架中的三种H门。?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> ?<CODE><FONT face=Courier size=2>ActionSupport</FONT></CODE> 来整?StrutsQ第一U窍门中是q样做的Q简单而快P但是会将 Struts 动作?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架耦合在一赗如果您需要将应用E序ULC个不同的框架Q则需要重写代码。第二种解决Ҏ通过委托 <CODE><FONT face=Courier size=2>RequestProcessor</FONT></CODE> 巧妙地解开代码的耦合Q但是它的可扩展性不强,q且?Struts ?<CODE><FONT face=Courier size=2>RequestProcessor</FONT></CODE> 变成一pd命oӞq种Ҏ持l不了很长时间。第三种Ҏ是这三种Ҏ中最好的Q将 Struts 动作委托l?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架可以使代码解耦,从而您可以在您的 Struts 应用E序中利?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 的特性(比如日志记录拦截器)?/P> <P>三种 Struts-Spring 整合H门中的每一U都被实现成一个完整可用的应用E序。请参阅 <A ><FONT color=#996699>下蝲</FONT></A> 部分仔细研究它们?/P><BR><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><span id="1666611" class=atitle><A name=download><STRONG><FONT size=4>下蝲</FONT></STRONG></A></SPAN></P> <TABLE class=data-table-1 cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TH>描述</TH> <TH>名字</TH> <TH style="TEXT-ALIGN: right">大小</TH> <TH> 下蝲Ҏ</TH></TR> <TR> <TD class=tb-row>ActionSupport sample code</TD> <TD noWrap>j-sr2-actionsupport.zip</TD> <TD style="TEXT-ALIGN: right" noWrap>5 MB</TD> <TD noWrap> <A class=fbox href="ftp://www6.software.ibm.com/software/developer/library/j-sr2-actionsupport.zip"><B><FONT face=Verdana color=#5c81a7>FTP</FONT></B></A></TD></TR> <TR> <TD class=tb-row>RequestProcessor sample code</TD> <TD noWrap>j-sr2-requestprocessor.zip</TD> <TD style="TEXT-ALIGN: right" noWrap>5 MB</TD> <TD noWrap> <A class=fbox href="ftp://www6.software.ibm.com/software/developer/library/j-sr2-requestprocessor.zip"><B><FONT face=Verdana color=#5c81a7>FTP</FONT></B></A></TD></TR> <TR> <TD class=tb-row>Delegate sample code</TD> <TD noWrap>j-sr2-delegate.zip</TD> <TD style="TEXT-ALIGN: right" noWrap>5 MB</TD> <TD noWrap> <A class=fbox href="ftp://www6.software.ibm.com/software/developer/library/j-sr2-delegate.zip"><B><FONT face=Verdana color=#5c81a7>FTP</FONT></B></A></TD></TR></TBODY></TABLE> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR vAlign=top> <TD colSpan=5><FONT face=Verdana color=#5c81a7><IMG height=12 alt="" src="http://www.ibm.com/i/c.gif" width=12 border=0></FONT></TD></TR> <TR> <TD><FONT face=Verdana color=#5c81a7><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/fw.gif" width=16></FONT></TD> <TD><A class=fbox ><FONT face=Verdana color=#5c81a7>关于下蝲Ҏ的信?/FONT></A></TD> <TD><FONT face=Verdana color=#5c81a7><IMG height=1 alt="" src="http://www.ibm.com/i/c.gif" width=50></FONT></TD> <TD><FONT face=Verdana color=#5c81a7><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/sout.gif" width=16></FONT></TD> <TD><A class=fbox ><FONT face=Verdana color=#5c81a7>获取 Adobe] Reader]</FONT></A></TD></TR></TBODY></TABLE><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><FONT face=Verdana color=#5c81a7><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></FONT></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><FONT face=Verdana color=#5c81a7><IMG height=16 alt="" src="http://www.ibm.com/i/v14/icons/u_bold.gif" width=16 border=0><BR></FONT></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699>回页?/FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR> <P><A name=resources><span id="1161611" class=atitle><STRONG><FONT size=4>参考资?</FONT></STRONG></SPAN></A></P><STRONG>学习</STRONG><BR> <UL> <LI>您可以参阅本文在 developerWorks 全球站点上的 <A target=_blank><FONT color=#5c81a7>英文原文</FONT></A>?BR><BR> <LI><A ><FONT color=#5c81a7><a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> pd</FONT></A>QNaveen BalaniQdeveloperWorksQ?005 q?6 ?9 月)Q对 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架的组件和Ҏ(包括 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> AOPQ的分ؓ四部分的介绍?BR><BR> <LI><A ><FONT color=#5c81a7>Best practices in Struts development</FONT></A>QPalaniyappan Thiagarajan ?Pagadala SureshQdeveloperWorksQ?004 q?6 月)Q概qC Struts <CODE><FONT face=Courier size=2>Action</FONT></CODE> lg?BR><BR> <LI><A ><FONT color=#5c81a7>Inversion of Control Containers and the Dependency Injection pattern</FONT></A>QMartin FowlerQ?004 q?1 月)Q介l?IOC 容器?BR><BR> <LI><A ><FONT color=#5c81a7>Introduction to the <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> Framework</FONT></A>QRod JohnsonQThe ServerSideQ?005 q?5 月)QSpring 的创立者解释了Z?<a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架很重要?BR><BR> <LI><A ><FONT color=#5c81a7>Struts Recipes</FONT></A>QGeorge Franciscus ?Danilo GurovichQManningQ?004 q_Q关?Struts H门和最佛_늚一个流行的U要?BR><BR> <LI><A ><FONT color=#5c81a7>Struts In Action</FONT></A>QTed Husted、Cedric Dumoulin、George Franciscus、David WinterfeldtQManningQ?002 q_Q针对专?Struts 开发h员的l合资源?BR><BR> <LI><A ><FONT color=#5c81a7><a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> In Action</FONT></A>QCraig Walls ?Ryan BreidenbachQManningQ?005 q_Q一本用于开发h员的 <a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 资源书籍?BR><BR> <LI><A ><FONT color=#5c81a7>Java 技术专?/FONT></A>Q找到关?Java ~程各个斚w的文章?BR><BR></LI></UL><BR><B>获得产品和技?/B><BR> <UL> <LI><A ><FONT color=#5c81a7>Struts 框架</FONT></A>QApache Software Foundation 的一个项目?BR><BR> <LI><A ><FONT color=#5c81a7><a title="心得与体? href="http://www.tkk7.com/shmily432685" >spring in action</a> 框架</FONT></A>Q一个分层的 Java 企业应用E序框架?BR><BR></LI></UL><BR><B>讨论</B><BR> <UL> <LI>加入本文?A href="javascript:void forumWindow()"><FONT color=#5c81a7>论坛</FONT></A> ?您也可以通过点击文章剙或者底部的论坛链接参加讨论?<BR><BR> <LI><A ><FONT color=#5c81a7>developerWorks blogs</FONT></A>Q加?developerWorks C֌?/LI></UL><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><IMG height=1 alt="" src="http://www.ibm.com/i/v14/rules/blue_rule.gif" width="100%"></TD></TR></TBODY></TABLE> <TABLE class=no-print cellSpacing=0 cellPadding=0 align=right> <TBODY> <TR align=right> <TD> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=center><BR></TD> <TD vAlign=top align=right><A class=fbox ><B><FONT face=Verdana color=#996699></FONT></B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR> <P><A name=author><span id="1616611" class=atitle><STRONG><FONT size=4>关于作?/FONT></STRONG></SPAN></A></P> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD colSpan=2><STRONG><FONT size=4><IMG height=5 alt="" src="http://www.ibm.com/i/c.gif" width="100%"></FONT></STRONG></TD></TR> <TR vAlign=top align=left> <TD> <P><STRONG><FONT size=4></FONT></STRONG></P></TD> <TD> <P>George Franciscus ?Java 公司的一名顾问和 Struts 斚w的权威。他?Manning 出版?<A ><FONT color=#5c81a7>Struts Recipes</FONT></A> ?<A ><FONT color=#5c81a7>Struts in Action</FONT></A> 的合著者?George 通过 <A ><FONT color=#5c81a7>nexcel.ca</FONT></A> 提供有关技术和理斚w的咨询服务?/P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><img src ="http://www.tkk7.com/shmily432685/aggbug/19069.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/shmily432685/" target="_blank">闉|</a> 2005-11-09 23:53 <a href="http://www.tkk7.com/shmily432685/archive/2005/11/09/19069.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Myeclipseq_struts+hibernate+spring目开发示?/title><link>http://www.tkk7.com/shmily432685/archive/2005/11/05/18233.html</link><dc:creator>闉|</dc:creator><author>闉|</author><pubDate>Fri, 04 Nov 2005 18:32:00 GMT</pubDate><guid>http://www.tkk7.com/shmily432685/archive/2005/11/05/18233.html</guid><description><![CDATA[     摘要:   <a href='http://www.tkk7.com/shmily432685/archive/2005/11/05/18233.html'>阅读全文</a><img src ="http://www.tkk7.com/shmily432685/aggbug/18233.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/shmily432685/" target="_blank">闉|</a> 2005-11-05 02:32 <a href="http://www.tkk7.com/shmily432685/archive/2005/11/05/18233.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://djyvp32.com" target="_blank">˳77777ɫ</a>| <a href="http://baiyifuwu.com" target="_blank">ŮſȸͰƵ</a>| <a href="http://4228970.com" target="_blank">޳avƬۿ</a>| <a href="http://www6yg6yg.com" target="_blank">ɫWW47</a>| <a href="http://28896543.com" target="_blank">ŮƵ</a>| <a href="http://cdhxfj.com" target="_blank">91޹߲ҹ</a>| <a href="http://shyangpuks.com" target="_blank">9ᆱƷƵ</a>| <a href="http://mysb123.com" target="_blank">AVۺɫһAV</a>| <a href="http://8xjr.com" target="_blank">Ƭѹۿȫ</a>| <a href="http://yixinbanks.com" target="_blank">ھƷþþþþþ</a>| <a href="http://a666999.com" target="_blank">߾Ʒ</a>| <a href="http://51comcomcom.com" target="_blank">޸Ƶ</a>| <a href="http://xtolm.com" target="_blank">Ƶѹۿ</a>| <a href="http://bjjs365.com" target="_blank">2020þþƷۺһ</a>| <a href="http://wogool.com" target="_blank">쿴ѸӰ</a>| <a href="http://sjzbosite.com" target="_blank">лGAYƬվWWW</a>| <a href="http://53reniao.com" target="_blank">ĻƵ</a>| <a href="http://lijieedu.com" target="_blank">91Ƶ</a>| <a href="http://155562.com" target="_blank">޾Ʒ</a>| <a href="http://cc8n.com" target="_blank">Ƶ</a>| <a href="http://c9133.com" target="_blank">һؼaaaaëƬѹۿ</a>| <a href="http://bx85.com" target="_blank">ۺɫ¶</a>| <a href="http://jiayila.com" target="_blank">ѹվ߹ۿƵ </a>| <a href="http://wenfaka.com" target="_blank">޾ƷƵ߹ۿ</a>| <a href="http://438266.com" target="_blank">һƷ</a>| <a href="http://manghuo365.com" target="_blank">ëƬƵ߹ۿ</a>| <a href="http://8izh.com" target="_blank">ؼëƬȫѲaһ </a>| <a href="http://www50884.com" target="_blank">޾ƷƵ</a>| <a href="http://717795.com" target="_blank">100000žž18</a>| <a href="http://k5nn.com" target="_blank">ۺ͵Ļ</a>| <a href="http://xjyzz.com" target="_blank">ɫۺϾþ</a>| <a href="http://www-70074.com" target="_blank">ɫվַ</a>| <a href="http://dyj696.com" target="_blank">þþƷav٤</a>| <a href="http://wwwabxx.com" target="_blank">޾Ʒþþþϼ</a>| <a href="http://pencilinside.com" target="_blank">߹ۿhƬ</a>| <a href="http://8654123.com" target="_blank">һ</a>| <a href="http://www-188588.com" target="_blank">պһҳƷ</a>| <a href="http://zz4466.com" target="_blank">һëƬ߲Ƶ </a>| <a href="http://sdtuoliuta.com" target="_blank">ѿŮҹƬ</a>| <a href="http://lfhuanxin.com" target="_blank">AV뾫Ʒɫҹ</a>| <a href="http://9981tv.com" target="_blank">뿨</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>