﻿<?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/juliashine/</link><description /><language>zh-cn</language><lastBuildDate>Wed, 29 Apr 2026 04:05:12 GMT</lastBuildDate><pubDate>Wed, 29 Apr 2026 04:05:12 GMT</pubDate><ttl>60</ttl><item><title>解决 Haddop 配置 SecondNameNode 引起的 java.io.IOException: GetImage failed. </title><link>http://www.blogjava.net/juliashine/archive/2011/09/13/358522.html</link><dc:creator>Juliashine</dc:creator><author>Juliashine</author><pubDate>Tue, 13 Sep 2011 03:44:00 GMT</pubDate><guid>http://www.blogjava.net/juliashine/archive/2011/09/13/358522.html</guid><wfw:comment>http://www.blogjava.net/juliashine/comments/358522.html</wfw:comment><comments>http://www.blogjava.net/juliashine/archive/2011/09/13/358522.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/juliashine/comments/commentRss/358522.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juliashine/services/trackbacks/358522.html</trackback:ping><description><![CDATA[<div>Haddop 配置引起的 <br />WARN org.mortbay.log: /getimage: java.io.IOException: GetImage failed. java.io.IOException: Content-Length header is not provided by &nbsp;the namenode when trying to fetch http://127.0.1.1:50090/getimage?getimage=1</div><br />最近在翻看NameNode的log时发现经常有这一段信息出现：<br /><br /><img src="http://www.blogjava.net/images/blogjava_net/juliashine/hadoop-warn.PNG" width="500" alt="" height="197" /><br /><br />看来是SecondNameNode在向NameNode获取Image时出的问题。虽然不影响hdfs使用，但是SecondName<br />备份功能失效，任其下去万一NameNode挂了那可就无处申冤了。<br />经过Google大神帮助，得知需要在hdfs-site.xml中手动配置dfs.secondary.http.address，这个配置项的默认值如下<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">property</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">name</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">dfs.namenode.secondary.http</span><span style="color: #000000; ">-</span><span style="color: #000000; ">address</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">name</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">value</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">0.0</span><span style="color: #000000; ">.</span><span style="color: #000000; ">0.0</span><span style="color: #000000; ">:</span><span style="color: #000000; ">50090</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">value</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">description</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;secondary&nbsp;namenode&nbsp;http&nbsp;server&nbsp;address&nbsp;and&nbsp;port.<br />&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;the&nbsp;port&nbsp;is&nbsp;</span><span style="color: #000000; ">0</span><span style="color: #000000; ">&nbsp;then&nbsp;the&nbsp;server&nbsp;will&nbsp;start&nbsp;on&nbsp;a&nbsp;free&nbsp;port.<br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">description</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br /></span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">property</span><span style="color: #000000; ">&gt;</span></div><div><div>需要明确指明SecondName，与conf/master里面的名称一样<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">property</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">name</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">dfs.namenode.secondary.http</span><span style="color: #000000; ">-</span><span style="color: #000000; ">address</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">name</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">value</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; ">test</span><span style="color: #000000; ">-</span><span style="color: #000000; ">dn2:</span><span style="color: #000000; ">50090</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">value</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;</span><span style="color: #000000; ">description</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br />&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;secondary&nbsp;namenode&nbsp;http&nbsp;server&nbsp;address&nbsp;and&nbsp;port.<br />&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;the&nbsp;port&nbsp;is&nbsp;</span><span style="color: #000000; ">0</span><span style="color: #000000; ">&nbsp;then&nbsp;the&nbsp;server&nbsp;will&nbsp;start&nbsp;on&nbsp;a&nbsp;free&nbsp;port.<br />&nbsp;&nbsp;</span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">description</span><span style="color: #000000; ">&gt;</span><span style="color: #000000; "><br /></span><span style="color: #000000; ">&lt;/</span><span style="color: #000000; ">property</span><span style="color: #000000; ">&gt;</span></div></div></div><img src ="http://www.blogjava.net/juliashine/aggbug/358522.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juliashine/" target="_blank">Juliashine</a> 2011-09-13 11:44 <a href="http://www.blogjava.net/juliashine/archive/2011/09/13/358522.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用js操作dom元素时需注意IE与FF的不同</title><link>http://www.blogjava.net/juliashine/archive/2007/03/29/106982.html</link><dc:creator>Juliashine</dc:creator><author>Juliashine</author><pubDate>Thu, 29 Mar 2007 07:06:00 GMT</pubDate><guid>http://www.blogjava.net/juliashine/archive/2007/03/29/106982.html</guid><wfw:comment>http://www.blogjava.net/juliashine/comments/106982.html</wfw:comment><comments>http://www.blogjava.net/juliashine/archive/2007/03/29/106982.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juliashine/comments/commentRss/106982.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juliashine/services/trackbacks/106982.html</trackback:ping><description><![CDATA[1、IE有全局event对象window.event，FF没有，FF中的 event 只能在事件发生的现场使用，即必须通过事件绑定函数的参数来使用。<br /><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"><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">input </span><span style="COLOR: #ff0000">type</span><span style="COLOR: #0000ff">="text"</span><span style="COLOR: #ff0000"> name</span><span style="COLOR: #0000ff">="input_content"</span><span style="COLOR: #ff0000"> onkeydown</span><span style="COLOR: #0000ff">="exeCode(<font color="#000000">event</font>)"</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #000000"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><br /><img id="Codehighlighter1_95_238_Open_Image" onclick="this.style.display='none'; Codehighlighter1_95_238_Open_Text.style.display='none'; Codehighlighter1_95_238_Closed_Image.style.display='inline'; Codehighlighter1_95_238_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_95_238_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_95_238_Closed_Text.style.display='none'; Codehighlighter1_95_238_Open_Image.style.display='inline'; Codehighlighter1_95_238_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">script </span><span style="COLOR: #ff0000">language</span><span style="COLOR: #0000ff">="javascript"</span><span style="COLOR: #0000ff">&gt;</span><span id="Codehighlighter1_95_238_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.blogjava.net/images/dot.gif" /></span><span id="Codehighlighter1_95_238_Open_Text"><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><br /><img id="Codehighlighter1_115_237_Open_Image" onclick="this.style.display='none'; Codehighlighter1_115_237_Open_Text.style.display='none'; Codehighlighter1_115_237_Closed_Image.style.display='inline'; Codehighlighter1_115_237_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_115_237_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_115_237_Closed_Text.style.display='none'; Codehighlighter1_115_237_Open_Image.style.display='inline'; Codehighlighter1_115_237_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /></span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">function</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> exeCode() </span><span id="Codehighlighter1_115_237_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.blogjava.net/images/dot.gif" /></span><span id="Codehighlighter1_115_237_Open_Text"><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />  </span><span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span><span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">取得事件对象</span><span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">  </span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> event </span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> arguments[</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">0</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">] </span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">||</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> window.event;<br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />  </span><span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span><span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">取得事件的发生源对象</span><span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">  </span><span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> element </span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> event.srcElement </span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">||</span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> event.target；<br /><img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /></span></span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">script</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /></span></div><br /><br />2、FireFox下没有preserveWhiteSpace这个属性，即:把空白也当作一个节点。而IE则默认为false，即把空白不看成一个节点。所以在FireFox下previousSibling可能是空白节点，除非两个HTML标签之间没有任何形式的空格。<br /><br />3、IE下可以用document.frames("name").document的方式取得frame中所嵌页面的document对象，FF下却会得到null，解决的的办法是document.getElementById(framename).contentWindow.document，也可以使用<br />window.frames[frameName].document 直接获取frame里的document对象<br /><br /><br />最后推荐一篇文章：<a title="Javascript的IE和Firefox兼容性汇编" href="http://www.hxblog.net/article.asp?id=983" target="_blank">Javascript的IE和Firefox兼容性汇编</a><br /><img src ="http://www.blogjava.net/juliashine/aggbug/106982.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juliashine/" target="_blank">Juliashine</a> 2007-03-29 15:06 <a href="http://www.blogjava.net/juliashine/archive/2007/03/29/106982.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Hibernate中配置Proxool连接池</title><link>http://www.blogjava.net/juliashine/archive/2006/12/21/89291.html</link><dc:creator>Juliashine</dc:creator><author>Juliashine</author><pubDate>Thu, 21 Dec 2006 07:13:00 GMT</pubDate><guid>http://www.blogjava.net/juliashine/archive/2006/12/21/89291.html</guid><wfw:comment>http://www.blogjava.net/juliashine/comments/89291.html</wfw:comment><comments>http://www.blogjava.net/juliashine/archive/2006/12/21/89291.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juliashine/comments/commentRss/89291.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juliashine/services/trackbacks/89291.html</trackback:ping><description><![CDATA[在Hibernate中配置Proxool连接池<br />1：在applicationContext.xml中配置SessionFactory<br />&lt;bean id="sessionfactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;<br />    &lt;property name="hibernateProperties"&gt;<br />        &lt;props&gt;<br />            &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.Oracle9Dialect&lt;/prop&gt;<br />            &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;<br />            &lt;!--指定Proxool配置文件--&gt;<br />            &lt;prop key="hibernate.proxool.properties"&gt;conf/proxool.properties&lt;/prop&gt;<br />            &lt;!--&lt;prop key="hibernate.proxool.xml"&gt;conf/proxool.xml&lt;/prop&gt;--&gt;<br />            &lt;!--指定Proxool的alias，必须与Proxool的配置文件中的alias一致--&gt;<br />            &lt;prop key="hibernate.proxool.pool_alias"&gt;hibernate-oracle&lt;/prop&gt;<br />        &lt;/props&gt;<br />    &lt;/property&gt;<br />&lt;/bean&gt;<br />2：配置Proxool(conf/proxool.properties)<br />#jdbc-0.proxool.alias=mysql<br />#jdbc-0.proxool.driver-class=org.gjt.mm.mysql.Driver<br />#jdbc-0.proxool.driver-url=jdbc:mysql://localhost:3306/contestdb?user=root&amp;password=1234&amp;useUnicode=true&amp;characterEncoding=utf8<br />#jdbc-0.user=root<br />#jdbc-0.password=1234<br /><br />jdbc-0.proxool.alias=hibernatea-oracle<br />jdbc-0.proxool.driver-class=oracle.jdbc.driver.OracleDriver<br />jdbc-0.proxool.driver-url=jdbc:oracle:thin:@172.16.2.6:1521:dbname<br />jdbc-0.user=username<br />jdbc-0.password=username<br />jdbc-0.proxool.maximum-connection-count=20<br />jdbc-0.proxool.house-keeping-test-sql=SELECT SYSDATE FROM DUAL;<br />#DEBUG, INFO, WARN, ERROR, FATAL.<br />jdbc-0.proxool.statistics-log-level=ERROR 
<br /><img src ="http://www.blogjava.net/juliashine/aggbug/89291.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juliashine/" target="_blank">Juliashine</a> 2006-12-21 15:13 <a href="http://www.blogjava.net/juliashine/archive/2006/12/21/89291.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>struts2的struts.properties配置文件详解（转）</title><link>http://www.blogjava.net/juliashine/archive/2006/12/21/89290.html</link><dc:creator>Juliashine</dc:creator><author>Juliashine</author><pubDate>Thu, 21 Dec 2006 07:11:00 GMT</pubDate><guid>http://www.blogjava.net/juliashine/archive/2006/12/21/89290.html</guid><wfw:comment>http://www.blogjava.net/juliashine/comments/89290.html</wfw:comment><comments>http://www.blogjava.net/juliashine/archive/2006/12/21/89290.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juliashine/comments/commentRss/89290.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juliashine/services/trackbacks/89290.html</trackback:ping><description><![CDATA[         The URL extension to use to determine if the request is meant for a Struts action <br />           用URL扩展名来确定是否这个请求是被用作Struts action，其实也就是设置 action的后缀，例如login.do的'do'字。<br /><br />struts.configuration<br />          The org.apache.struts2.config.Configuration implementation class<br />            org.apache.struts2.config.Configuration接口名<br /><br />struts.configuration.files<br />          A list of configuration files automatically loaded by Struts <br />           struts自动加载的一个配置文件列表<br /><br />struts.configuration.xml.reload<br />          Whether to reload the XML configuration or not<br />           是否加载xml配置(true,false)<br /><br />struts.continuations.package<br />           The package containing actions that use Rife continuations<br />           含有actions的完整连续的package名称<br /><br />struts.custom.i18n.resources<br />          Location of additional localization properties files to load <br />           加载附加的国际化属性文件（不包含.properties后缀）<br /><br />struts.custom.properties<br />          Location of additional configuration properties files to load<br />           加载附加的配置文件的位置<br /><br /><br />struts.devMode<br />          Whether Struts is in development mode or not<br />           是否为struts开发模式<br /><br />struts.dispatcher.parametersWorkaround<br />          Whether to use a Servlet request parameter workaround necessary for some versions of WebLogic<br />            （某些版本的weblogic专用）是否使用一个servlet请求参数工作区（PARAMETERSWORKAROUND）<br /><br />struts.enable.DynamicMethodInvocation<br />          Allows one to disable dynamic method invocation from the URL<br />            允许动态方法调用<br /><br />struts.freemarker.manager.classname<br />          The org.apache.struts2.views.freemarker.FreemarkerManager implementation class <br />           org.apache.struts2.views.freemarker.FreemarkerManager接口名<br /><br />struts.i18n.encoding<br />          The encoding to use for localization messages<br />           国际化信息内码<br /><br />struts.i18n.reload<br />          Whether the localization messages should automatically be reloaded<br />           是否国际化信息自动加载 <br /><br />struts.locale<br />          The default locale for the Struts application<br />           默认的国际化地区信息<br /><br />struts.mapper.class<br />          The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class<br />            org.apache.struts2.dispatcher.mapper.ActionMapper接口<br /><br />struts.multipart.maxSize<br />          The maximize size of a multipart request (file upload)<br />           multipart请求信息的最大尺寸（文件上传用） <br /><br />struts.multipart.parser<br />          The org.apache.struts2.dispatcher.multipart.<br />          MultiPartRequest parser implementation for a multipart request (file upload) <br />          专为multipart请求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口（文件上传用）<br /><br /><br />struts.multipart.saveDir<br />          The directory to use for storing uploaded files <br />           设置存储上传文件的目录夹<br /><br />struts.objectFactory<br />          The com.opensymphony.xwork2.ObjectFactory implementation class<br />           com.opensymphony.xwork2.ObjectFactory接口（spring）<br /><br />struts.objectFactory.spring.autoWire<br />          Whether Spring should autoWire or not<br />           是否自动绑定Spring<br /><br />struts.objectFactory.spring.useClassCache<br />          Whether Spring should use its class cache or not<br />           是否spring应该使用自身的cache <br /><br />struts.objectTypeDeterminer<br />          The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class<br />            com.opensymphony.xwork2.util.ObjectTypeDeterminer接口<br /><br />struts.serve.static.browserCache<br />  If static content served by the Struts filter should set browser caching header properties or not <br />           是否struts过滤器中提供的静态内容应该被浏览器缓存在头部属性中<br /><br />struts.serve.static<br />          Whether the Struts filter should serve static content or not <br />           是否struts过滤器应该提供静态内容<br /><br />struts.tag.altSyntax<br />          Whether to use the alterative syntax for the tags or not <br />           是否可以用替代的语法替代tags<br /><br />struts.ui.templateDir<br />          The directory containing UI templates<br />           UI templates的目录夹 <br /><br />struts.ui.theme<br />          The default UI template theme<br />           默认的UI template主题<br /><br />struts.url.http.port<br />          The HTTP port used by Struts URLs<br />           设置http端口<br /><br />struts.url.https.port<br />          The HTTPS port used by Struts URLs <br />           设置https端口<br /><br />struts.url.includeParams<br />          The default includeParams method to generate Struts URLs <br />          在url中产生 默认的includeParams<br /><br /><br />struts.velocity.configfile<br />          The Velocity configuration file path<br />           velocity配置文件路径<br /><br />struts.velocity.contexts<br />          List of Velocity context names<br />           velocity的context列表<br /><br /><br />struts.velocity.manager.classname<br />          org.apache.struts2.views.velocity.VelocityManager implementation class<br />           org.apache.struts2.views.velocity.VelocityManager接口名<br /><br />struts.velocity.toolboxlocation<br />          The location of the Velocity toolbox<br />           velocity工具盒的位置 <br />struts.xslt.nocache<br />          Whether or not XSLT templates should not be cached<br />           是否XSLT模版应该被缓存<br /><img src ="http://www.blogjava.net/juliashine/aggbug/89290.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juliashine/" target="_blank">Juliashine</a> 2006-12-21 15:11 <a href="http://www.blogjava.net/juliashine/archive/2006/12/21/89290.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Struts 2.01整合Spring</title><link>http://www.blogjava.net/juliashine/archive/2006/12/15/87994.html</link><dc:creator>Juliashine</dc:creator><author>Juliashine</author><pubDate>Fri, 15 Dec 2006 09:04:00 GMT</pubDate><guid>http://www.blogjava.net/juliashine/archive/2006/12/15/87994.html</guid><wfw:comment>http://www.blogjava.net/juliashine/comments/87994.html</wfw:comment><comments>http://www.blogjava.net/juliashine/archive/2006/12/15/87994.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juliashine/comments/commentRss/87994.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juliashine/services/trackbacks/87994.html</trackback:ping><description><![CDATA[
		<font face="Courier New">Struts2 发布已经很长时间了，一直没有顾得上学习，本周工作比较轻松，花点时间照着例子做了一下，但是在与Spring 集成的时候出现问题，action找不到Spring中定义的bean，折腾了两个多小时才最终搞定，决定把心得记录下来。<br /></font>
		<br />
		<font face="Courier New">Struts2 集成 Spring 的 Web.xml 最简配置<br /><br /></font>
		<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">
				<font face="Courier New" size="2">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">&lt;?</span>
						<span style="COLOR: #ff00ff">xml version="1.0" encoding="UTF-8"</span>
						<span style="COLOR: #0000ff">?&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New" size="2">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">web-app </span>
								<span style="COLOR: #ff0000">id</span>
								<span style="COLOR: #0000ff">="WebApp_9"</span>
								<span style="COLOR: #ff0000"> version</span>
								<span style="COLOR: #0000ff">="2.4"</span>
								<span style="COLOR: #ff0000"> xmlns</span>
								<span style="COLOR: #0000ff">="http://java.sun.com/xml/ns/j2ee"</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #ff0000"> <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    xmlns:xsi</span>
								<span style="COLOR: #0000ff">="http://www.w3.org/2001/XMLSchema-instance"</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #ff0000"> <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    xsi:schemaLocation</span>
								<span style="COLOR: #0000ff">="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
										<br />
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">display-name</span>
								<span style="COLOR: #0000ff">&gt;</span>
								<span style="COLOR: #000000">Struts 2.0</span>
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">display-name</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">filter</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">filter-name</span>
								<span style="COLOR: #0000ff">&gt;</span>
								<span style="COLOR: #000000">struts</span>
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">filter-name</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #000000">        <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">filter-class</span>
								<span style="COLOR: #0000ff">&gt;</span>
								<span style="COLOR: #000000">org.apache.struts2.dispatcher.FilterDispatcher</span>
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">filter-class</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">filter</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">filter-mapping</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">filter-name</span>
								<span style="COLOR: #0000ff">&gt;</span>
								<span style="COLOR: #000000">struts</span>
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">filter-name</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">url-pattern</span>
								<span style="COLOR: #0000ff">&gt;</span>
								<span style="COLOR: #000000">/*</span>
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">url-pattern</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">filter-mapping</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">listener</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">listener-class</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />            org.springframework.web.context.ContextLoaderListener<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">listener-class</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">listener</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">welcome-file-list</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;</span>
								<span style="COLOR: #800000">welcome-file</span>
								<span style="COLOR: #0000ff">&gt;</span>
								<span style="COLOR: #000000">index.html</span>
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">welcome-file</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<font size="2">
										<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">welcome-file-list</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New" size="2">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font size="2">
						<font face="Courier New">
								<span style="COLOR: #0000ff">&lt;/</span>
								<span style="COLOR: #800000">web-app</span>
								<span style="COLOR: #0000ff">&gt;</span>
						</font>
				</font>
		</div>
		<font face="Courier New">
				<br />此配置适用于将Spring 的配置文件放在与Web.xml同一目录，即WEB-INF目录下，且配置文件采用默认命名applicationContext.xml，如果Spring配置文件没有放在WEB-INF下或者采用了自定义名称，则Web.xml应该如下定义：<br /><br /></font>
		<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">
				<font face="Courier New">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">&lt;?</span>
						<span style="COLOR: #ff00ff">xml version="1.0" encoding="UTF-8"</span>
						<span style="COLOR: #0000ff">?&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">web-app </span>
						<span style="COLOR: #ff0000">id</span>
						<span style="COLOR: #0000ff">="WebApp_9"</span>
						<span style="COLOR: #ff0000"> version</span>
						<span style="COLOR: #0000ff">="2.4"</span>
						<span style="COLOR: #ff0000"> xmlns</span>
						<span style="COLOR: #0000ff">="http://java.sun.com/xml/ns/j2ee"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #ff0000"> <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    xmlns:xsi</span>
						<span style="COLOR: #0000ff">="http://www.w3.org/2001/XMLSchema-instance"</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #ff0000"> <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    xsi:schemaLocation</span>
						<span style="COLOR: #0000ff">="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">context-param</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">param-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">contextConfigLocation</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">param-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">param-value</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">classpath*:applicationContext*.xml</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">param-value</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">context-param</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">filter</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">filter-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">struts</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">filter-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<font face="Courier New">
						<span style="COLOR: #000000">        <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">filter-class</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">org.apache.struts2.dispatcher.FilterDispatcher</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">filter-class</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">filter</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">filter-mapping</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">filter-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">struts</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">filter-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">url-pattern</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">/*</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">url-pattern</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">filter-mapping</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">listener</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">listener-class</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />            org.springframework.web.context.ContextLoaderListener<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">listener-class</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">listener</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">welcome-file-list</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">welcome-file</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">index.html</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">welcome-file</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">welcome-file-list</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">web-app</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<font face="Courier New">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</font>
				</span>
		</div>
		<br />
		<font face="Courier New">注意这里比上个配置多出的项<br /></font>
		<br />
		<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">
				<font face="Courier New">
						<span style="COLOR: #0000ff">   &lt;</span>
						<span style="COLOR: #800000">context-param</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">      &lt;</span>
						<span style="COLOR: #800000">param-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">contextConfigLocation</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">param-name</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">      &lt;</span>
						<span style="COLOR: #800000">param-value</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">classpath*:applicationContext*.xml</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">param-value</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
				</span>
				<font face="Courier New">
						<span style="COLOR: #0000ff">   &lt;/</span>
						<span style="COLOR: #800000">context-param</span>
						<span style="COLOR: #0000ff">&gt;</span>
				</font>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<br />
		<font face="Courier New">表示Spring配置文件放在CLASSPATH目录下，即WEB-INF/classes目录下，名称为applicationContext*.xml，其中“*”为任意字符<br /><br />注意，这还没完，CLASSPATH下有个struts.property文件，必须在里面添加一行内容：<br />（我就是缺了这个导致action找不到bean）<br /><br /><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"><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">struts.objectFactory = spring  </span></div><p>给Spring配置文件的&lt;beans&gt;元素加上如下属性<br /></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"><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">beans </span><span style="COLOR: #ff0000">default-autowire</span><span style="COLOR: #0000ff">="autodetect"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">   <br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />  …… ……<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /></span></div><p>OK,配置完毕！可以使用了<br /></p></font>
<img src ="http://www.blogjava.net/juliashine/aggbug/87994.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juliashine/" target="_blank">Juliashine</a> 2006-12-15 17:04 <a href="http://www.blogjava.net/juliashine/archive/2006/12/15/87994.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>数据挖掘学习笔记之 Classification模型选择 (一)  ROC </title><link>http://www.blogjava.net/juliashine/archive/2006/12/12/87246.html</link><dc:creator>Juliashine</dc:creator><author>Juliashine</author><pubDate>Tue, 12 Dec 2006 06:25:00 GMT</pubDate><guid>http://www.blogjava.net/juliashine/archive/2006/12/12/87246.html</guid><wfw:comment>http://www.blogjava.net/juliashine/comments/87246.html</wfw:comment><comments>http://www.blogjava.net/juliashine/archive/2006/12/12/87246.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/juliashine/comments/commentRss/87246.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/juliashine/services/trackbacks/87246.html</trackback:ping><description><![CDATA[ROC曲线（Receiver Operating Characteeristic Curve）是显示Classification模型真正率和假正率之间折中的一种图形化方法。<br /><br />解读ROC图的一些概念定义:：<br /><br />真正（True Positive , TP）被模型预测为正的正样本<br />假负（False Negative , FN）被模型预测为负的正样本<br />假正（False Positive , FP）被模型预测为正的负样本<br />真负（True Negative , TN）被模型预测为负的负样本 <br /><br />真正率（True Positive Rate , TPR）或灵敏度（sensitivity） <br />   TPR = TP /（TP + FN） <br />   正样本预测结果数 / 正样本实际数 <br />假负率（False Negative Rate , FNR） <br />   FNR = FN /（TP + FN） <br />   被预测为负的正样本结果数 / 正样本实际数<br />假正率（False Positive Rate , FPR） <br />   FPR = FP /（FP + TN） <br />   被预测为正的负样本结果数 /负样本实际数 <br />真负率（True Negative Rate , TNR）或特指度（specificity） <br />   TNR = TN /（TN + FP） <br />   负样本预测结果数 / 负样本实际数 <br /><br />目标属性的被选中的那个期望值称作是“正”（positive）<br /><br />ROC曲线上几个关键点的解释：<br /><br />( TPR=0,FPR=0 ) 把每个实例都预测为负类的模型<br />( TPR=1,FPR=1 ) 把每个实例都预测为正类的模型<br />( TPR=1,FPR=0 ) 理想模型<br /><br /><em><font color="#ff0000">此处图像以后再补<br /></font><br /></em>一个好的分类模型应该尽可能靠近图形的左上角，而一个随机猜测模型应位于连接点（TPR=0,FPR=0）和（TPR=1,FPR=1）的主对角线上。<br /><br />ROC曲线下方的面积（AUC）提供了评价模型平均性能的另一种方法。如果模型是完美的，那么它的AUG = 1，如果模型是个简单的随机猜测模型，那么它的AUG = 0.5，如果一个模型好于另一个，则它的曲线下方面积相对较大。<br /><br /><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"><img id="Code_Closed_Image_143317" onclick="this.style.display='none'; Code_Closed_Text_143317.style.display='none'; Code_Open_Image_143317.style.display='inline'; Code_Open_Text_143317.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" /><img id="Code_Open_Image_143317" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_143317.style.display='none'; Code_Closed_Image_143317.style.display='inline'; Code_Closed_Text_143317.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" /><span id="Code_Closed_Text_143317" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Oracle 论坛上对ROC 的解释</span><span id="Code_Open_Text_143317" style="DISPLAY: none"><br /><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><font size="3"><span style="COLOR: #000000">This explaination comes from one of our algorithm engineers: <br /><br /></span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">The ROC analysis applies to binary classification problems. One of the classes is selected as a </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">positive</span><span style="COLOR: #000000">"</span></font><span style="COLOR: #000000"><font size="3"> one. The ROC chart plots the true positive rate as a function of the false positive rate. It is parametrized by the probability threshold values. The true positive rate represents the fraction of positive cases that were correctly classified by the model. The false positive rate represents the fraction of negative cases that were incorrectly classified as positive. Each point on the ROC plot represents a true_positive_rate/false_positive_rate pair corresponding to a particular probability threshold. Each point has a corresponding confusion matrix. The user can analyze the confusion matrices produced at different threshold levels and select a probability threshold to be used for scoring. The probability threshold choice is usually based on application requirements (i.e., acceptable level of false positives).<br /></font></span><span style="COLOR: #000000"><br /></span><font size="3"><span style="COLOR: #000000">The ROC does not represent a model. Instead it quantifies its discriminatory ability and assists the user in selecting an appropriate operating point </span><span style="COLOR: #0000ff"><font color="#000000">for</font></span><span style="COLOR: #000000"> scoring.</span></font><span style="COLOR: #000000"><font size="3">"<br /></font></span><span style="COLOR: #000000"><br /><font size="3">I would add to </font></span><font size="3"><span style="COLOR: #0000ff"><font color="#000000">this</font></span><span style="COLOR: #000000"> that you can select a threshold point the build activity to bias the apply process. Currently we generate a cost matrix based on the selected threshold point rather than use the threshold point directly.</span></font></span></div><a href="http://forums.oracle.com/forums/thread.jspa?threadID=415870&amp;tstart=15">http://forums.oracle.com/forums/thread.jspa?threadID=415870&amp;tstart=15</a><img src ="http://www.blogjava.net/juliashine/aggbug/87246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/juliashine/" target="_blank">Juliashine</a> 2006-12-12 14:25 <a href="http://www.blogjava.net/juliashine/archive/2006/12/12/87246.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>