﻿<?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-七重天-随笔分类-SSH 学习</title><link>http://www.blogjava.net/juliashine/category/18404.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 12:04:47 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 12:04:47 GMT</pubDate><ttl>60</ttl><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></channel></rss>