锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲A∨无码无在线观看,亚洲JIZZJIZZ妇女,黑人精品videos亚洲人http://www.tkk7.com/charles/category/36706.html浠EE涓轟富鏀伙紝浠lex涓虹偣緙錛屼互Eclipse RCP涓轟箰瓚?/description>zh-cnMon, 16 Feb 2009 20:48:31 GMTMon, 16 Feb 2009 20:48:31 GMT60鍦⊿pring鍩虹涓婂疄鐜拌嚜宸辯殑寮傚父澶勭悊妗嗘灦 http://www.tkk7.com/charles/archive/2009/02/12/254469.htmlsuprasoft Inc,.suprasoft Inc,.Thu, 12 Feb 2009 14:58:00 GMThttp://www.tkk7.com/charles/archive/2009/02/12/254469.htmlhttp://www.tkk7.com/charles/comments/254469.htmlhttp://www.tkk7.com/charles/archive/2009/02/12/254469.html#Feedback0http://www.tkk7.com/charles/comments/commentRss/254469.htmlhttp://www.tkk7.com/charles/services/trackbacks/254469.html闃呰鍏ㄦ枃

]]>
璇籗pring婧愪唬鐮佷箣鎸夊浘绱㈤錛堜竴錛塁ontext鍒涘緩涓庨厤緗枃浠跺姞杞?/title><link>http://www.tkk7.com/charles/archive/2008/12/26/248497.html</link><dc:creator>suprasoft Inc,.</dc:creator><author>suprasoft Inc,.</author><pubDate>Fri, 26 Dec 2008 08:53:00 GMT</pubDate><guid>http://www.tkk7.com/charles/archive/2008/12/26/248497.html</guid><wfw:comment>http://www.tkk7.com/charles/comments/248497.html</wfw:comment><comments>http://www.tkk7.com/charles/archive/2008/12/26/248497.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/charles/comments/commentRss/248497.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/charles/services/trackbacks/248497.html</trackback:ping><description><![CDATA[<p>Spring 鍜?Struts鍦╳eb.xml涓鍔犵殑閰嶇疆錛?/p> <div id="auasgii" class="csharpcode-wrapper"> <div id="amssiaa" class="csharpcode"><pre class="alt"><span id="smkgcsk" class="lnum"> 1:</span> <span id="mgkmyow" class="rem"><!-- spring鐨勯厤緗?--></span></pre><pre class="alteven"><span id="wokuyom" class="lnum"> 2:</span> <span id="akoqska" class="kwrd"><</span><span id="iwykgem" class="html">context-param</span><span id="ygkuomm" class="kwrd">></span></pre><pre class="alt"><span id="kwgsuai" class="lnum"> 3:</span> <span id="ckoqcca" class="kwrd"><</span><span id="egaewem" class="html">param-name</span><span id="umgiksa" class="kwrd">></span>contextConfigLocation<span id="ykuosyo" class="kwrd"></</span><span id="keqkeeu" class="html">param-name</span><span id="oycmymu" class="kwrd">></span></pre><pre class="alteven"><span id="gokeqwm" class="lnum"> 4:</span> <span id="aceacau" class="kwrd"><</span><span id="skosmmc" class="html">param-value</span><span id="gikgyqo" class="kwrd">></span>classpath:/SpringContext/applicationContext-web.xml<span id="moqswck" class="kwrd"></</span><span id="gacgyiq" class="html">param-value</span><span id="ceasuka" class="kwrd">></span></pre><pre class="alt"><span id="eqseyme" class="lnum"> 5:</span> <span id="yaueyoo" class="kwrd"></</span><span id="qkeyccs" class="html">context-param</span><span id="gicmqgm" class="kwrd">></span> </pre><pre class="alt"><span id="smgycii" class="lnum"> 7:</span>  </pre><pre class="alteven"><span id="kgamgwm" class="lnum"> 8:</span> <span id="cmoyayy" class="kwrd"><</span><span id="iuoiciy" class="html">listener</span><span id="iqkgqqy" class="kwrd">></span></pre><pre class="alt"><span id="umgawus" class="lnum"> 9:</span> <span id="skoqmki" class="kwrd"><</span><span id="qsugcsi" class="html">listener-class</span><span id="oieyiyq" class="kwrd">></span>org.springframework.web.context.ContextLoaderListener</pre><pre class="alteven"><span id="oicoqow" class="lnum"> 10:</span> <span id="iceoago" class="kwrd"></</span><span id="eqaoyqo" class="html">listener-class</span><span id="aoqumuc" class="kwrd">></span></pre><pre class="alt"><span id="smgicaa" class="lnum"> 11:</span> <span id="akwsmca" class="kwrd"></</span><span id="oqkmgyo" class="html">listener</span><span id="egseyqo" class="kwrd">></span></pre><pre class="alteven"><span id="keyamkc" class="lnum"> 12:</span>  </pre><pre class="alt"><span id="gycmouu" class="lnum"> 13:</span> <span id="ucqswka" class="kwrd"><</span><span id="oikuqgm" class="html">filter</span><span id="icgamci" class="kwrd">></span></pre><pre class="alteven"><span id="wgsuiyw" class="lnum"> 14:</span> <span id="icwyqqg" class="kwrd"><</span><span id="qimyaay" class="html">filter-name</span><span id="cmqswwu" class="kwrd">></span>struts2<span id="aueikaq" class="kwrd"></</span><span id="giswsaq" class="html">filter-name</span><span id="cwicmec" class="kwrd">></span></pre><pre class="alt"><span id="qcmqiiq" class="lnum"> 15:</span> <span id="ugqkooe" class="kwrd"><</span><span id="smmqsia" class="html">filter-class</span><span id="skeykiq" class="kwrd">></span>org.apache.struts2.dispatcher.FilterDispatcher<span id="smgscsi" class="kwrd"></</span><span id="uoquoee" class="html">filter-class</span><span id="oekmigu" class="kwrd">></span></pre><pre class="alt"><span id="ggkcyoe" class="lnum"> 17:</span> <span id="ceqkwmc" class="kwrd"><</span><span id="koqmywc" class="html">init-param</span><span id="wyqcoek" class="kwrd">></span></pre><pre class="alteven"><span id="acqcmec" class="lnum"> 18:</span> <span id="okmoiaq" class="kwrd"><</span><span id="keqcwcs" class="html">param-name</span><span id="kuokeuk" class="kwrd">></span>config<span id="memicqq" class="kwrd"></</span><span id="kmoamus" class="html">param-name</span><span id="aeyiuka" class="kwrd">></span></pre><pre class="alt"><span id="asegsiq" class="lnum"> 19:</span> <span id="iueykiy" class="kwrd"><</span><span id="qsmoqgg" class="html">param-value</span><span id="smgkcus" class="kwrd">></span>struts-default.xml,struts-plugin.xml,struts/struts.xml<span id="yscegwm" class="kwrd"></</span><span id="kuqswkk" class="html">param-value</span><span id="cuoacas" class="kwrd">></span></pre><pre class="alteven"><span id="iykgqiw" class="lnum"> 20:</span> <span id="qacoayo" class="kwrd"></</span><span id="icwicsi" class="html">init-param</span><span id="iimeiyo" class="kwrd">></span></pre><pre class="alt"><span id="cmyacki" class="lnum"> 21:</span> <span id="wycmqoe" class="kwrd"></</span><span id="myskwuc" class="html">filter</span><span id="iumqiig" class="kwrd">></span></pre><pre class="alteven"><span id="egikemu" class="lnum"> 22:</span>  </pre><pre class="alt"><span id="qacyiiy" class="lnum"> 23:</span> <span id="sugsmui" class="kwrd"><</span><span id="ggcmgwm" class="html">filter-mapping</span><span id="ikmgiiy" class="kwrd">></span></pre><pre class="alteven"><span id="gwsuwms" class="lnum"> 24:</span> <span id="eoqiukq" class="kwrd"><</span><span id="icgqcca" class="html">filter-name</span><span id="gseycsy" class="kwrd">></span>struts2<span id="cuysuka" class="kwrd"></</span><span id="kueokaq" class="html">filter-name</span><span id="eegkmes" class="kwrd">></span></pre><pre class="alt"><span id="mwquwwc" class="lnum"> 25:</span> <span id="weycweu" class="kwrd"><</span><span id="egaegoo" class="html">url-pattern</span><span id="acgiuia" class="kwrd">></span>*.do<span id="scmckiy" class="kwrd"></</span><span id="cyauwme" class="html">url-pattern</span><span id="eqkgqyy" class="kwrd">></span></pre><pre class="alteven"><span id="aseqaqg" class="lnum"> 26:</span> <span id="cmwsuuc" class="kwrd"></</span><span id="egkwiqw" class="html">filter-mapping</span><span id="qkeykii" class="kwrd">></span></pre></div></div> <p> </p> <p>絎竴涓猼ag瀹氫箟鐨勬槸spring鐨勯厤緗枃浠跺湴鍧鍒扮幆澧冨弬鏁?context parameter)</p> <p>絎簩涓猼ag瀹氫箟涓涓猯istener涓?u>org.springframework.web.context.ContextLoaderListener</u>,榪欓噷鐩稿綋浜巎2ee瀹瑰櫒緇欐垜浠彁渚涚殑main鍑芥暟鐨勫垏鍏ョ偣錛屽彲浠ヨ鎴戜滑鍋氫竴浜涚郴緇熷垵濮嬪寲鐨勫伐浣滐紝闇瑕佸疄鐜扮殑綾繪槸錛歫avax.servlet.ServletContextListener</p> <p>絎笁涓猼ag鍒欏畾涔変簡struts2鐨勪竴涓猣ilter銆侳ilter鍒欐槸瀵規瘡嬈¤姹傦紙鍙互閫氳繃filter-mapping鎸囧畾錛夊仛榪囨護澶勭悊錛岃姹傞鍏堣榪噁ilter閾劇殑澶勭悊錛岀劧鍚庡啀鍒癏ttpServlet鐨刬nit鏂規硶銆傚搴旂殑綾繪槸錛歫avax.servlet.Filter銆備笂闈㈠厛閰嶇疆浜嗕竴涓猣ilter,瀵瑰簲鐨勭被鏄痮rg.apache.struts2.dispatcher.FilterDispatcher,鍙傛暟鍒欐槸struts鐨勯厤緗枃浠朵綅緗?/p> <p>絎洓涓弬鏁板畾涔変簡filter鎬庢牱琛屼負錛屾樉鐒跺畠瀵?do涓哄悗緙鐨勮姹傚簲鐢╯truts2榪欎釜鍚嶇О鐨刦ilter</p> <div id="wosugwe" class="csharpcode-wrapper"> <div id="cegkcsa" class="csharpcode"><pre class="alt">榪欓噷闇瑕侀鍏堟悶娓呮servlet瑙勮寖涓粈涔堟槸listener?</pre><pre class="alteven"> </pre><pre class="alt">璇︾粏璇峰弬瑙?<a >Servlet Listener鍜孎ilter</a></pre></div></div> <p> </p> <p>鏌ョ湅ContextLoaderListener鍙煡錛屽畠姝eソ緇ф壙浜?u>javax.servlet.ServletContextListener</u>錛岀敤浜庣洃鍚琷avax.servlet.ServletContextEvent浜嬩歡</p> <div id="ggsmygy" class="csharpcode-wrapper"> <div id="mqmwaqy" class="csharpcode"><pre class="alt"><span id="oqsmyom" class="rem">/*</span></pre><pre class="alteven"><span id="ikeqkam" class="rem"> * Copyright 2002-2007 the original author or authors.</span></pre><pre class="alt"><span id="yyseoww" class="rem"> *</span></pre><pre class="alteven"><span id="qiugqyg" class="rem"> * Licensed under the Apache License, Version 2.0 (the "License");</span></pre><pre class="alt"><span id="uuwkoek" class="rem"> * you may not use this file except in compliance with the License.</span></pre><pre class="alteven"><span id="qkwykiq" class="rem"> * You may obtain a copy of the License at</span></pre><pre class="alt"><span id="amqkuks" class="rem"> *</span></pre><pre class="alteven"><span id="suwqsaq" class="rem"> * http://www.apache.org/licenses/LICENSE-2.0</span></pre><pre class="alt"><span id="moamgmm" class="rem"> *</span></pre><pre class="alteven"><span id="skgakkq" class="rem"> * Unless required by applicable law or agreed to in writing, software</span></pre><pre class="alt"><span id="gsmyiay" class="rem"> * distributed under the License is distributed on an "AS IS" BASIS,</span></pre><pre class="alteven"><span id="ismquaq" class="rem"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></pre><pre class="alt"><span id="eqiuwmm" class="rem"> * See the License for the specific language governing permissions and</span></pre><pre class="alteven"><span id="scoasia" class="rem"> * limitations under the License.</span></pre><pre class="alt"><span id="cyqmgwu" class="rem"> */</span></pre><pre class="alteven"> </pre><pre class="alt">package org.springframework.web.context;</pre><pre class="alteven"> </pre><pre class="alt">import javax.servlet.ServletContextEvent;</pre><pre class="alteven">import javax.servlet.ServletContextListener;</pre><pre class="alt"> </pre><pre class="alteven"><span id="skwikcs" class="rem">/**</span></pre><pre class="alt"><span id="giauyec" class="rem"> * Bootstrap listener to start up Spring's root {@link WebApplicationContext}.</span></pre><pre class="alteven"><span id="ameakcs" class="rem"> * Simply delegates to {@link ContextLoader}.</span></pre><pre class="alt"><span id="kkmqksy" class="rem"> *</span></pre><pre class="alteven"><span id="ooiugwu" class="rem"> * <p>This listener should be registered after</span></pre><pre class="alt"><span id="yawicia" class="rem"> * {@link org.springframework.web.util.Log4jConfigListener}</span></pre><pre class="alteven"><span id="skeyski" class="rem"> * in <code>web.xml</code>, if the latter is used.</span></pre><pre class="alt"><span id="ogicowu" class="rem"> *</span></pre><pre class="alteven"><span id="aeosuuk" class="rem"> * @author Juergen Hoeller</span></pre><pre class="alt"><span id="keiayiq" class="rem"> * @since 17.02.2003</span></pre><pre class="alteven"><span id="oqssqgu" class="rem"> * @see ContextLoaderServlet</span></pre><pre class="alt"><span id="akwqsai" class="rem"> * @see org.springframework.web.util.Log4jConfigListener</span></pre><pre class="alteven"><span id="gqueywe" class="rem"> */</span></pre><pre class="alt"><span id="imyicms" class="kwrd">public</span> <span id="isuqkao" class="kwrd">class</span> ContextLoaderListener implements ServletContextListener {</pre><pre class="alteven"> </pre><pre class="alt"> <span id="sceacks" class="kwrd">private</span> ContextLoader contextLoader;</pre><pre class="alteven"> </pre><pre class="alt"> </pre><pre class="alteven"> <span id="ookcgom" class="rem">/**</span></pre><pre class="alt"><span id="qwscwom" class="rem"> * Initialize the root web application context.</span></pre><pre class="alteven"><span id="qmwycki" class="rem"> */</span></pre><pre class="alt"> <span id="yawgsao" class="kwrd">public</span> <span id="woacgww" class="kwrd">void</span> contextInitialized(ServletContextEvent <span id="gikwayo" class="kwrd">event</span>) {</pre><pre class="alteven"> <span id="kequgaa" class="kwrd">this</span>.contextLoader = createContextLoader();</pre><pre class="alt"> <span id="kswqacs" class="kwrd">this</span>.contextLoader.initWebApplicationContext(<span id="ysmoqou" class="kwrd">event</span>.getServletContext());</pre><pre class="alteven"> }</pre><pre class="alt"> </pre><pre class="alteven"> <span id="gycgigy" class="rem">/**</span></pre><pre class="alt"><span id="yisoyow" class="rem"> * Create the ContextLoader to use. Can be overridden in subclasses.</span></pre><pre class="alteven"><span id="mgscoee" class="rem"> * @return the new ContextLoader</span></pre><pre class="alt"><span id="wmycuuk" class="rem"> */</span></pre><pre class="alteven"> <span id="wqkeywu" class="kwrd">protected</span> ContextLoader createContextLoader() {</pre><pre class="alt"> <span id="gicoqqg" class="kwrd">return</span> <span id="ceykouc" class="kwrd">new</span> ContextLoader();</pre><pre class="alteven"> }</pre><pre class="alt"> </pre><pre class="alteven"> <span id="eosmwoe" class="rem">/**</span></pre><pre class="alt"><span id="oaseqym" class="rem"> * Return the ContextLoader used by this listener.</span></pre><pre class="alteven"><span id="yscoiiy" class="rem"> * @return the current ContextLoader</span></pre><pre class="alt"><span id="mogsouk" class="rem"> */</span></pre><pre class="alteven"> <span id="kugqmks" class="kwrd">public</span> ContextLoader getContextLoader() {</pre><pre class="alt"> <span id="yawokig" class="kwrd">return</span> <span id="kkoauua" class="kwrd">this</span>.contextLoader;</pre><pre class="alteven"> }</pre><pre class="alt"> </pre><pre class="alteven"> </pre><pre class="alt"> <span id="qsuqcai" class="rem">/**</span></pre><pre class="alteven"><span id="qsmgksy" class="rem"> * Close the root web application context.</span></pre><pre class="alt"><span id="kcwqska" class="rem"> */</span></pre><pre class="alteven"> <span id="ugicowe" class="kwrd">public</span> <span id="mogsumk" class="kwrd">void</span> contextDestroyed(ServletContextEvent <span id="smosmsa" class="kwrd">event</span>) {</pre><pre class="alt"> <span id="yicwqqo" class="kwrd">if</span> (<span id="wiswqqw" class="kwrd">this</span>.contextLoader != <span id="acmyuaa" class="kwrd">null</span>) {</pre><pre class="alteven"> <span id="eyeaumc" class="kwrd">this</span>.contextLoader.closeWebApplicationContext(<span id="qcegqqg" class="kwrd">event</span>.getServletContext());</pre><pre class="alt"> }</pre><pre class="alteven"> }</pre><pre class="alt"> </pre><pre class="alteven">}</pre></div></div> <p>姝ょ被implement浜哠ervletContextListener鐨勪袱涓柟娉曪細</p> <div id="qumyuss" class="csharpcode-wrapper"> <div id="kyauyye" class="csharpcode"><pre class="alt"><span id="iseykay" class="kwrd">public</span> <span id="kkosuss" class="kwrd">void</span> contextInitialized(ServletContextEvent <span id="mooackg" class="kwrd">event</span>);</pre><pre class="alteven"><span id="gqmwsai" class="kwrd">public</span> <span id="aaeqiao" class="kwrd">void</span> contextDestroyed(ServletContextEvent <span id="wwiuwew" class="kwrd">event</span>);</pre></div></div> <p>鍒嗗埆鍋歝ontext鐨勫垵濮嬪寲鍜岄攢姣?/p> <p>鍙﹀鎻愪緵浜嗕竴涓猵rotected鏂規硶錛歱rotected ContextLoader createContextLoader()  鐢ㄤ簬鍒涘緩鐪熸鍋氫簨鎯呯殑浠g悊綾籆otextLoader</p> <p>鍜屼竴涓猵ublic鏂規硶錛歱ublic ContextLoader getContextLoader()錛?/p> <p> </p> <p>鍙錛岃繖涓狶istener綾葷洿鎺ュ皢宸ヤ綔<strong><u>浠g悊</u></strong>緇欎簡ContextLoader綾諱簡</p> <p> </p> <p>____________________________________________________________________________________________________________________________</p> <p>鎴戜滑鎸夊浘绱㈤錛屼笅闈㈠啀鍒嗘瀽org.springframework.web.context.ContextLoader</p> <p>ContextLoader閲岄潰鏈変釜縐佹湁鎴愬憳錛歱rivate WebApplicationContext context</p> <p>姝ゅ彉閲忔彁渚涗簡create鏂規硶錛?/p> <p>createWebApplicationContext(ServletContext servletContext, ApplicationContext parent) <p>鍥犱負Spring鎻愪緵浜嗗縐峎ebApplicationContext綾伙紝鎵浠ラ渶瑕佷竴涓柟娉曟潵鍐沖畾浣跨敤鍝釜WebApplicationContextContext綾?/p> <div id="osuoaqg" class="csharpcode-wrapper"> <div id="skmgkii" class="csharpcode"><pre class="alt"><span id="acgcemm" class="kwrd">protected</span> Class determineContextClass(ServletContext servletContext) throws ApplicationContextException {</pre><pre class="alteven"> String contextClassName = servletContext.getInitParameter(CONTEXT_CLASS_PARAM);</pre><pre class="alt"> <span id="eqsmqec" class="kwrd">if</span> (contextClassName != <span id="smqceka" class="kwrd">null</span>) {</pre><pre class="alteven"> <span id="uwaeowc" class="kwrd">try</span> {</pre><pre class="alt"> <span id="eoamyoe" class="kwrd">return</span> ClassUtils.forName(contextClassName);</pre><pre class="alteven"> }</pre><pre class="alt"> <span id="gssmogo" class="kwrd">catch</span> (ClassNotFoundException ex) {</pre><pre class="alteven"> <span id="cmqsecs" class="kwrd">throw</span> <span id="eeqseus" class="kwrd">new</span> ApplicationContextException(</pre><pre class="alt"> <span id="iawycsi" class="str">"Failed to load custom context class ["</span> + contextClassName + <span id="myimogm" class="str">"]"</span>, ex);</pre><pre class="alteven"> }</pre><pre class="alt"> }</pre><pre class="alteven"> <span id="smeacqo" class="kwrd">else</span> {</pre><pre class="alt"> contextClassName = defaultStrategies.getProperty(WebApplicationContext.<span id="swqkwkk" class="kwrd">class</span>.getName());</pre><pre class="alteven"> <span id="qqcmgky" class="kwrd">try</span> {</pre><pre class="alt"> <span id="uyyawck" class="kwrd">return</span> ClassUtils.forName(contextClassName, ContextLoader.<span id="mwgauci" class="kwrd">class</span>.getClassLoader());</pre><pre class="alteven"> }</pre><pre class="alt"> <span id="qieosiy" class="kwrd">catch</span> (ClassNotFoundException ex) {</pre><pre class="alteven"> <span id="smosmkw" class="kwrd">throw</span> <span id="keoackc" class="kwrd">new</span> ApplicationContextException(</pre><pre class="alt"> <span id="iakoggu" class="str">"Failed to load default context class ["</span> + contextClassName + <span id="seyaeui" class="str">"]"</span>, ex);</pre><pre class="alteven"> }</pre><pre class="alt"> }</pre><pre class="alteven"> }</pre></div></div> <p> </p> <p>public static final String CONTEXT_CLASS_PARAM = "contextClass";</p> <p>鎵浠ュ鏋滃湪web.xml涓殑<context-param> </context-param>涓畾涔変簡鍙傛暟contextClass錛岄偅涔堢洿鎺ュ氨鍐沖畾浜嗙敤姝ontext綾?/p> <p>鍚﹀垯錛屽氨搴旂敤緙虹渷絳栫暐鏉ュ喅瀹氫嬌鐢ㄥ摢涓狢ontext綾匯?/p> <p>緙虹渷絳栫暐濡備笅錛?/p> <div id="qskoqom" class="csharpcode-wrapper"> <div id="uuqsmca" class="csharpcode"><pre class="alt"><span id="suysukc" class="kwrd">private</span> <span id="oqmqiqy" class="kwrd">static</span> final Properties defaultStrategies;</pre><pre class="alteven"> </pre><pre class="alt"><span id="eyacgwm" class="kwrd">static</span> {</pre><pre class="alteven"> <span id="qseskkk" class="rem">// Load default strategy implementations from properties file.</span></pre><pre class="alt"> <span id="oicgsag" class="rem">// This is currently strictly internal and not meant to be customized</span></pre><pre class="alteven"> <span id="wyuwqow" class="rem">// by application developers.</span></pre><pre class="alt"> <span id="ssogkiq" class="kwrd">try</span> {</pre><pre class="alteven"> ClassPathResource resource = <span id="mqcmqyo" class="kwrd">new</span> ClassPathResource(DEFAULT_STRATEGIES_PATH, ContextLoader.<span id="aseyuas" class="kwrd">class</span>);</pre><pre class="alt"> defaultStrategies = PropertiesLoaderUtils.loadProperties(resource);</pre><pre class="alteven"> }</pre><pre class="alt"> <span id="iscgiiq" class="kwrd">catch</span> (IOException ex) {</pre><pre class="alteven"> <span id="skeimci" class="kwrd">throw</span> <span id="eikoiqg" class="kwrd">new</span> IllegalStateException(<span id="yugacku" class="str">"Could not load 'ContextLoader.properties': "</span> + ex.getMessage());</pre><pre class="alt"> }</pre><pre class="alteven">}</pre></div></div> <p>瀹為檯涓婏紝緙虹渷絳栫暐浠巓rg\springframework\web\context\ContextLoader.properties 鏂囦歡涓彇寰楀睘鎬rg.springframework.web.context.WebApplicationContext</p> <p>鎴戜滑鐪嬬湅ContextLoader.properties鏂囦歡鐨勫唴瀹癸細</p> <div id="kseysiq" class="csharpcode-wrapper"> <div id="suoyuka" class="csharpcode"><pre class="alt"># Default WebApplicationContext implementation <span id="eeicoww" class="kwrd">class</span> <span id="asoyuci" class="kwrd">for</span> ContextLoader.</pre><pre class="alteven"># Used <span id="gkcoiyq" class="kwrd">as</span> fallback when no <span id="eoimecc" class="kwrd">explicit</span> context implementation has been specified <span id="iaugsig" class="kwrd">as</span> context-param.</pre><pre class="alt"># Not meant to be customized by application developers.</pre><pre class="alteven"> </pre><pre class="alt">org.springframework.web.context.WebApplicationContext=org.springframework.web.context.support.XmlWebApplicationContext</pre></div></div> <p>鏄劇劧錛岀己鐪佺殑Context綾誨氨鏄?XmlWebApplicationContext綾?/p> <p>錛侊紒錛佺湡绱晩錛孲pring...</p> <p> </p> <p>OK,鎬葷畻鐭ラ亾鐢ㄥ摢涓狢ontext綾諱簡錛岄偅涔堢幇鍦ㄥ埌浜哻reate榪欎釜Context瀹炰緥鐨勬椂鍊欎簡</p> <div id="oiugayo" class="csharpcode-wrapper"> <div id="yiuoiyo" class="csharpcode"><pre class="alt"><span id="mwgaema" class="kwrd">protected</span> WebApplicationContext createWebApplicationContext(</pre><pre class="alteven"> ServletContext servletContext, ApplicationContext parent) throws BeansException {</pre><pre class="alt"> </pre><pre class="alteven"> Class contextClass = determineContextClass(servletContext);</pre><pre class="alt"> <span id="gyuoigw" class="kwrd">if</span> (!ConfigurableWebApplicationContext.<span id="iuwisia" class="kwrd">class</span>.isAssignableFrom(contextClass)) {</pre><pre class="alteven"> <span id="mosmwus" class="kwrd">throw</span> <span id="cooscai" class="kwrd">new</span> ApplicationContextException(<span id="wgsugwm" class="str">"Custom context class ["</span> + contextClass.getName() +</pre><pre class="alt"> <span id="ikmyukq" class="str">"] is not of type ["</span> + ConfigurableWebApplicationContext.<span id="wasogee" class="kwrd">class</span>.getName() + <span id="akegqom" class="str">"]"</span>);</pre><pre class="alteven"> }</pre><pre class="alt"> </pre><pre class="alteven"> ConfigurableWebApplicationContext wac =</pre><pre class="alt"> (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass);</pre><pre class="alteven"> wac.setParent(parent);</pre><pre class="alt"> wac.setServletContext(servletContext);</pre><pre class="alteven"> wac.setConfigLocation(servletContext.getInitParameter(CONFIG_LOCATION_PARAM));</pre><pre class="alt"> customizeContext(servletContext, wac);</pre><pre class="alteven"> wac.refresh();</pre><pre class="alt"> </pre><pre class="alteven"> <span id="eqcegoe" class="kwrd">return</span> wac;</pre><pre class="alt"> }</pre></div></div> <p>榪欓噷寰堝鏄撶悊瑙o紝鍙笉榪囧畠鐨勫垱寤轟笉鏄洿鎺ew錛岃屾槸灝佽浜嗕竴灞傦紝璋冪敤BeanUtils.instantiateClass()宸ュ叿鏂規硶</p> <p>鎺ヤ笅鏉ヨ瀹歐ebApplicationCcontext瀹炰緥鐨刾arent, servletContext, </p> <p>鍏朵腑閰嶇疆鏂囦歡浣嶇疆(web.xml涓?鐨刢ontextConfigLocation鍙傛暟鎸囧畾鐨?/p> <div id="sqwikaa" class="csharpcode-wrapper"> <div id="qkwyaig" class="csharpcode"><pre class="alt"><context-param></pre><pre class="alteven"> <param-name>contextConfigLocation</param-name></pre><pre class="alt"> <param-<span id="eeqummu" class="kwrd">value</span>>classpath:/SpringContext/applicationContext-web.xml</pre><pre class="alteven"> </param-<span id="acgqsiy" class="kwrd">value</span>></pre><pre class="alt"></context-param></pre></div></div> <p>鍊掓暟絎簩琛岃皟鐢ㄧ殑customizeContext()鏂規硶鐩墠Spring瀹炵幇浠g爜鏄┖鐨勶紝浼拌鐣欎綔浠ュ悗錛堢湅鏉ヤ竾浜嬭鐣欎綑鍦板晩^_^錛?/p> <p>鏈鍚庝竴浠朵簨灝辨槸璋冪敤WebApplicationContext鐨?font color="#ff0000" size="4"><u>refresh()</u></font>鏂規硶銆傦紙榪欎釜鏂規硶鏄釜stratup鏂規硶錛屽緢閲嶈銆備粬騫茬殑浜嬫儏鍚庨潰浼氱潃閲嶆秹鍙婏級</p> <p> </p> <p>鏈鍚庡氨鏄湡姝e仛浜嬬殑initWebApplicationContext()鏂規硶錛?/p> <div id="goiugum" class="csharpcode-wrapper"> <div id="gasmqoe" class="csharpcode"><pre class="alt"><span id="yqmgaqw" class="kwrd">public</span> WebApplicationContext initWebApplicationContext(ServletContext servletContext)</pre><pre class="alteven"> throws IllegalStateException, BeansException {</pre><pre class="alt"> </pre><pre class="alteven"> <span id="cesmwec" class="kwrd">if</span> (servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE) != <span id="yaswigo" class="kwrd">null</span>) {</pre><pre class="alt"> <span id="iauguka" class="kwrd">throw</span> <span id="uuyauug" class="kwrd">new</span> IllegalStateException(</pre><pre class="alteven"> <span id="woamoca" class="str">"Cannot initialize context because there is already a root application context present - "</span> +</pre><pre class="alt"> <span id="saeyaiw" class="str">"check whether you have multiple ContextLoader* definitions in your web.xml!"</span>);</pre><pre class="alteven"> }</pre><pre class="alt"> </pre><pre class="alteven"> servletContext.log(<span id="keyicss" class="str">"Initializing Spring root WebApplicationContext"</span>);</pre><pre class="alt"> <span id="kwykgec" class="kwrd">if</span> (logger.isInfoEnabled()) {</pre><pre class="alteven"> logger.info(<span id="mwaugew" class="str">"Root WebApplicationContext: initialization started"</span>);</pre><pre class="alt"> }</pre><pre class="alteven"> <span id="kwqkmmk" class="kwrd">long</span> startTime = System.currentTimeMillis();</pre><pre class="alt"> </pre><pre class="alteven"> <span id="eoaewmc" class="kwrd">try</span> {</pre><pre class="alt"> <span id="sceqmci" class="rem">// Determine parent for root web application context, if any.</span></pre><pre class="alteven"> ApplicationContext parent = loadParentContext(servletContext);</pre><pre class="alt"> </pre><pre class="alteven"> <span id="ewiuemc" class="rem">// Store context in local instance variable, to guarantee that</span></pre><pre class="alt"> <span id="ueqcewk" class="rem">// it is available on ServletContext shutdown.</span></pre><pre class="alteven"> <span id="ikeacsa" class="kwrd">this</span>.context = createWebApplicationContext(servletContext, parent);</pre><pre class="alt"> servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, <span id="gyuoyog" class="kwrd">this</span>.context);</pre><pre class="alteven"> currentContextPerThread.put(Thread.currentThread().getContextClassLoader(), <span id="aeyauss" class="kwrd">this</span>.context);</pre><pre class="alt"> </pre><pre class="alteven"> <span id="ickwagm" class="kwrd">if</span> (logger.isDebugEnabled()) {</pre><pre class="alt"> logger.debug(<span id="oqmicii" class="str">"Published root WebApplicationContext as ServletContext attribute with name ["</span> +</pre><pre class="alteven"> WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE + <span id="akwgksi" class="str">"]"</span>);</pre><pre class="alt"> }</pre><pre class="alteven"> <span id="mqimoom" class="kwrd">if</span> (logger.isInfoEnabled()) {</pre><pre class="alt"> <span id="ceysmsi" class="kwrd">long</span> elapsedTime = System.currentTimeMillis() - startTime;</pre><pre class="alteven"> logger.info(<span id="egcoyow" class="str">"Root WebApplicationContext: initialization completed in "</span> + elapsedTime + <span id="acokqou" class="str">" ms"</span>);</pre><pre class="alt"> }</pre><pre class="alteven"> </pre><pre class="alt"> <span id="egiwyow" class="kwrd">return</span> <span id="iuwimsi" class="kwrd">this</span>.context;</pre><pre class="alteven"> }</pre><pre class="alt"> <span id="meqsmca" class="kwrd">catch</span> (RuntimeException ex) {</pre><pre class="alteven"> logger.error(<span id="qceqksa" class="str">"Context initialization failed"</span>, ex);</pre><pre class="alt"> servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex);</pre><pre class="alteven"> <span id="ueqkkai" class="kwrd">throw</span> ex;</pre><pre class="alt"> }</pre><pre class="alteven"> <span id="myswgoe" class="kwrd">catch</span> (Error err) {</pre><pre class="alt"> logger.error(<span id="yquogyw" class="str">"Context initialization failed"</span>, err);</pre><pre class="alteven"> servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, err);</pre><pre class="alt"> <span id="yscoqym" class="kwrd">throw</span> err;</pre><pre class="alteven"> }</pre><pre class="alt"> }</pre></div></div> <p>瀹冨叾瀹炲仛寰椾簨鎯呭緢綆鍗曪紝璋冪敤loadParentContext()鏂規硶鑾峰彇鐖禼ontext,璋冪敤createWebApplicationContext()鍒涘緩WebApplicationContext瀹炰緥</p> <p> </p> <p>涓鍒囬兘浼間箮瀹屾垚浜嗭紝鑷沖皯鎴戜滑鏄庣櫧浜嗛厤緗枃浠舵槸濡備綍鍔犺澆榪涘幓鐨勶紝鑷充簬IoC瀹瑰櫒濡備綍甯綘娉ㄥ叆閰嶇疆鏂囦歡涓殑bean錛屼笅嬈″啀鎺㈢儲銆傜嚎绱㈡槸浠涔堝憿錛熶綘榪樿寰楀湪createWebApplication()鐨勬渶鍚庝竴姝ュ仛浠涔堜簡鍚楋紵refresh(), 瀵逛簡錛岃繖涓氨鏄綘浣滀負鑱屼笟"鍢垮"瑕佹帰绱㈢殑涓嬩竴涓嚎绱?/p><img src ="http://www.tkk7.com/charles/aggbug/248497.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/charles/" target="_blank">suprasoft Inc,.</a> 2008-12-26 16:53 <a href="http://www.tkk7.com/charles/archive/2008/12/26/248497.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>PO BO VO DTO POJO DAO姒傚康鍙婂叾浣滅敤錛堥檮杞崲鍥撅級http://www.tkk7.com/charles/archive/2008/12/26/248418.htmlsuprasoft Inc,.suprasoft Inc,.Fri, 26 Dec 2008 04:53:00 GMThttp://www.tkk7.com/charles/archive/2008/12/26/248418.htmlhttp://www.tkk7.com/charles/comments/248418.htmlhttp://www.tkk7.com/charles/archive/2008/12/26/248418.html#Feedback0http://www.tkk7.com/charles/comments/commentRss/248418.htmlhttp://www.tkk7.com/charles/services/trackbacks/248418.htmlJ2EE寮鍙戜腑澶ч噺鐨勪笓涓氱緝鐣ヨ寰堟槸璁╀漢榪鋒儜錛屽挨鍏舵槸璺熶竴浜涢珮鎵嬭璁洪棶棰樼殑鏃跺欙紝涓夊垎閽熷氨琚漢瀹舵弧鍙g殑涓撲笟鏈鍠鋒檿浜嗭紝PO VO BO DTO POJO DAO錛屼竴澶у爢鐨勫氨鏉ヤ簡錛堝惉榪囪佺綏瀵硅繖縐嶇幇璞$殑鎵瑰垽鐨勬湅鍙嬩細浼氬績涓絎戯級銆?

    棣栧厛澹版槑鍋朵篃涓嶆槸浠涔堥珮鎵嬶紝浠ヤ笅鎬葷粨閮芥槸鑷繁鐨勪綋浼氥備笉瀵逛箣澶勮鎮ㄥ鎸囨暀銆?

PO錛?br>persistant object鎸佷箙瀵硅薄
鏈褰㈣薄鐨勭悊瑙e氨鏄竴涓狿O灝辨槸鏁版嵁搴撲腑鐨勪竴鏉¤褰曘?br>濂藉鏄彲浠ユ妸涓鏉¤褰曚綔涓轟竴涓璞″鐞嗭紝鍙互鏂逛究鐨勮漿涓哄叾瀹冨璞°?


BO錛?br>business object涓氬姟瀵硅薄
涓昏浣滅敤鏄妸涓氬姟閫昏緫灝佽涓轟竴涓璞°傝繖涓璞″彲浠ュ寘鎷竴涓垨澶氫釜鍏跺畠鐨勫璞°?br>姣斿涓涓畝鍘嗭紝鏈夋暀鑲茬粡鍘嗐佸伐浣滅粡鍘嗐佺ぞ浼氬叧緋葷瓑絳夈?br>鎴戜滑鍙互鎶婃暀鑲茬粡鍘嗗搴斾竴涓狿O錛屽伐浣滅粡鍘嗗搴斾竴涓狿O錛岀ぞ浼氬叧緋誨搴斾竴涓狿O銆?br>寤虹珛涓涓搴旂畝鍘嗙殑BO瀵硅薄澶勭悊綆鍘嗭紝姣忎釜BO鍖呭惈榪欎簺PO銆?br>榪欐牱澶勭悊涓氬姟閫昏緫鏃訛紝鎴戜滑灝卞彲浠ラ拡瀵笲O鍘誨鐞嗐?


VO 錛?br>value object鍊煎璞?br>ViewObject琛ㄧ幇灞傚璞?br>涓昏瀵瑰簲鐣岄潰鏄劇ず鐨勬暟鎹璞°傚浜庝竴涓猈EB欏甸潰錛屾垨鑰匰WT銆丼WING鐨勪竴涓晫闈紝鐢ㄤ竴涓猇O瀵硅薄瀵瑰簲鏁翠釜鐣岄潰鐨勫箋?


DTO 錛?br>Data Transfer Object鏁版嵁浼犺緭瀵硅薄
涓昏鐢ㄤ簬榪滅▼璋冪敤絳夐渶瑕佸ぇ閲忎紶杈撳璞$殑鍦版柟銆?br>姣斿鎴戜滑涓寮犺〃鏈?00涓瓧孌碉紝閭d箞瀵瑰簲鐨凱O灝辨湁100涓睘鎬с?br>浣嗘槸鎴戜滑鐣岄潰涓婂彧瑕佹樉紺?0涓瓧孌碉紝
瀹㈡埛绔敤WEB service鏉ヨ幏鍙栨暟鎹紝娌℃湁蹇呰鎶婃暣涓狿O瀵硅薄浼犻掑埌瀹㈡埛绔紝
榪欐椂鎴戜滑灝卞彲浠ョ敤鍙湁榪?0涓睘鎬х殑DTO鏉ヤ紶閫掔粨鏋滃埌瀹㈡埛绔紝榪欐牱涔熶笉浼氭毚闇叉湇鍔$琛ㄧ粨鏋?鍒拌揪瀹㈡埛绔互鍚庯紝濡傛灉鐢ㄨ繖涓璞℃潵瀵瑰簲鐣岄潰鏄劇ず錛岄偅姝ゆ椂瀹冪殑韜喚灝辮漿涓篤O


POJO 錛?br>plain ordinary java object 綆鍗昷ava瀵硅薄
涓漢鎰熻POJO鏄渶甯歌鏈澶氬彉鐨勫璞★紝鏄竴涓腑闂村璞★紝涔熸槸鎴戜滑鏈甯告墦浜ら亾鐨勫璞°?br>涓涓狿OJO鎸佷箙鍖栦互鍚庡氨鏄疨O
鐩存帴鐢ㄥ畠浼犻掋佷紶閫掕繃紼嬩腑灝辨槸DTO
鐩存帴鐢ㄦ潵瀵瑰簲琛ㄧず灞傚氨鏄疺O


DAO錛?br>data access object鏁版嵁璁塊棶瀵硅薄
榪欎釜澶у鏈鐔熸倝錛屽拰涓婇潰鍑犱釜O鍖哄埆鏈澶э紝鍩烘湰娌℃湁浜掔浉杞寲鐨勫彲鑳芥у拰蹇呰.
涓昏鐢ㄦ潵灝佽瀵規暟鎹簱鐨勮闂傞氳繃瀹冨彲浠ユ妸POJO鎸佷箙鍖栦負PO錛岀敤PO緇勮鍑烘潵VO銆丏TO
      鎬葷粨涓嬫垜璁や負涓涓璞$┒绔熸槸浠涔圤瑕佺湅鍏蜂綋鐜錛屽湪涓嶅悓鐨勫眰銆佷笉鍚岀殑搴旂敤鍦哄悎錛屽璞$殑韜喚涔熶笉涓鏍鳳紝鑰屼笖瀵硅薄韜喚鐨勮漿鍖栦篃鏄緢鑷劧鐨勩傚氨鍍忎綘瀵硅佸﹩鏉ヨ灝辨槸鑰佸叕錛屽鐖舵瘝鏉ヨ灝辨槸瀛愬コ銆傝璁¤繖浜涙蹇電殑鍒濊》涓嶆槸涓轟簡鍞漢鑰屾槸涓轟簡鏇村ソ鐨勭悊瑙e拰澶勭悊鍚勭閫昏緫錛岃澶у鑳芥洿濂界殑鍘葷敤闈㈠悜瀵硅薄鐨勬柟寮忓鐞嗛棶棰?
      澶у鍗冧竾涓嶈闄峰叆榪囧害璁捐錛屽ぇ鍙笉蹇呬負浜嗚璁¤岃璁′竴瀹氳鍦ㄤ唬鐮佷腑鍖哄垎鍚勪釜瀵硅薄銆備竴鍙ヨ瘽鎶鏈槸涓哄簲鐢ㄦ湇鍔$殑銆?br>嬈㈣繋鎸囨銆?



鐢諱簡涓浘錛屾劅瑙夋病鏈夊畬鍏ㄨ〃杈懼嚭鑷繁鐨勬剰鎬濄傘傘傘傘傝皝甯繖瀹屽杽涓嬶紝鏈濂借兘浣撶幇鍚勪釜O鍦∕VC涓殑浣嶇疆
snap20070108.jpg

]]>
web.xml璇﹁Вhttp://www.tkk7.com/charles/archive/2008/12/26/248402.htmlsuprasoft Inc,.suprasoft Inc,.Fri, 26 Dec 2008 03:34:00 GMThttp://www.tkk7.com/charles/archive/2008/12/26/248402.htmlhttp://www.tkk7.com/charles/comments/248402.htmlhttp://www.tkk7.com/charles/archive/2008/12/26/248402.html#Feedback0http://www.tkk7.com/charles/comments/commentRss/248402.htmlhttp://www.tkk7.com/charles/services/trackbacks/248402.html姣忎竴涓珯鐨刉EB-INF涓嬮兘鏈変竴涓獁eb.xml鐨勮瀹氭枃浠訛紝瀹冩彁渚涗簡鎴戜滑绔欏彴鐨勯厤緗瀹?

web.xml瀹氫箟錛?br>.绔欏彴鐨勫悕縐板拰璇存槑
.閽堝鐜鍙傛暟(Context)鍋氬垵濮嬪寲宸ヤ綔
.Servlet鐨勫悕縐板拰鏄犲皠
.Session鐨勮瀹?br>.Tag library鐨勫鏄?br>.JSP緗戦〉璁懼畾
.Mime Type澶勭悊
.閿欒澶勭悊
.鍒╃敤JDNI鍙栧緱绔欏彴璧勬簮

瑕佷簡瑙eb.xml鐨勮瀹氬鹼紝蹇呴』浜嗚В瀹冪殑schema,浠巜eb.xml涓煡閬撳畠鐨剆chema鏄敱Sum Microsystems鍏徃瀹氬埗鐨勶紝濡傛灉浣犳兂鏇翠負璇︾粏鐨勪簡瑙e畠錛?br>鍙互鍒?a >http://java.sun.com/xml/ns/j2ee/web-mapp_2_4.xsd緗戦〉錛岄偅閲屾湁鏇翠負璇︾粏鐨勪粙緇嶃傝繖閲屾垜浠嬬粛鎴戜滑騫沖父瑙佸緱鏈澶氱殑.

   1: <?xml version="1.0" encoding="ISO-8859-1"?> 
   2:  
   3: <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
   4:     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   5:     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
   6:     version="2.4">
   7: <web-app>


榪欐槸涓鑸湪鍐橷ML鏃舵墍鍋氱殑澹版槑,瀹氫箟浜哫ML鐨勭増鏈紝緙栫爜鏍煎紡,榪樻湁閲嶈鐨勬寚鏄巗chema鐨勬潵婧?涓?a >http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd.

<description>,<display-name>,<icon>
____________________________________________

<description>绔欏彴鎻忚堪</discription>
瀵圭珯鍙板仛鍑烘弿榪?

<display-name>绔欏彴鍚嶇О</display-name>
瀹氫箟绔欏彴鐨勫悕縐?

<icon>
icon鍏冪礌鍖呭惈small-icon鍜宭arge-icon涓や釜瀛愬厓绱?鐢ㄦ潵鎸囧畾web绔欏彴涓皬鍥炬爣鍜屽ぇ鍥炬爣鐨勮礬寰?
<small-icon>/璺緞/smallicon.gif</small-icon>
small-icon鍏冪礌搴旀寚鍚憌eb绔欏彴涓煇涓皬鍥炬爣鐨勮礬寰?澶у皬涓?6 X 16 pixel,浣嗘槸鍥捐薄鏂囦歡蹇呴』涓篏IF鎴朖PEG鏍煎紡,鎵╁睍鍚嶅繀欏諱負:.gif鎴?jpg.

<large-icon>/璺緞/largeicon-jpg</large-icon>
large-icon鍏冪礌搴旀寚鍚憌eb绔欏彴涓煇涓ぇ鍥捐〃璺緞,澶у皬涓?2 X 32 pixel,浣嗘槸鍥捐薄鏂囦歡蹇呴』涓篏IF鎴朖PEG鐨勬牸寮?鎵╁睍鍚嶅繀欏諱負; gif
鎴杍pg.
鑼冧緥:

   1: <display-name>Develop Example</display-name>
   2: <description>JSP 2.0 Tech Book's Examples</description>
   3: <icon>
   4:    <small-icon>/images/small.gif</small-icon>
   5:    <large-icon>/images/large.gir</large-icon>
   6: </icon> 
   7:  
   8: <distributable>

 

 

 

 

<distributable>
______________________________________
distributable 鍏冪礌涓虹┖鏍囩,瀹冪殑瀛樺湪涓庡惁鍙互鎸囧畾绔欏彴鏄惁鍙垎甯冨紡澶勭悊.濡傛灉web.xml涓嚭鐜拌繖涓厓绱?鍒欎唬琛ㄧ珯鍙板湪寮鍙戞椂宸茬粡
琚璁′負鑳藉湪澶氫釜JSP Container 涔嬮棿鍒嗘暎鎵ц.
鑼冧緥:

   1: <distributable/> 

 

 

 

<context-param>
___________________________________

<context-param>
context-param 鍏冪礌鐢ㄦ潵璁懼畾web绔欑偣鐨?u>鐜鍙傛暟(context),瀹冨寘鍚袱涓瓙鍏冪礌:
param-name鍜宲aram-value.
<param-name>鍙傛暟鍚嶇О</param-name>
璁懼畾Context鍚嶇О
<param-value>鍊?lt;/param-value>
璁懼畾Context鍚嶇О鐨勫?br></context-param>
鑼冧緥:

   1: <context-param>
   2:    <param-name>param_name</param-name>
   3:    <param-value>param_value</param-value>
   4: </context-param>


姝ゆ墍璁懼畾鐨勫弬鏁?鍦↗SP緗戦〉涓彲浠ヤ嬌鐢ㄤ笅鍒楁柟娉曟潵鍙栧緱:

   1: ${initParam.param_name}


鑻ュ湪Servlet鍙互浣跨敤涓嬪垪鏂規硶鏉ヨ幏寰?

   1: String param_name=getServletContext().getInitParamter("param_name"); 

鍙堝Spring framework鍦ㄨ繖閲屽彲浠ヨ緗甤ontext鍙傛暟

   1: <!-- spring鐨勯厤緗?-->
   2: <context-param>
   3:     <param-name>contextConfigLocation</param-name>
   4:     <param-value>classpath:/SpringContext/applicationContext-web.xml
   5:     </param-value>
   6: </context-param>

 

 

 

 

<filter>
_________________________________
filter鍏冪礌鐢ㄦ潵澹版槑filter鐨勭浉鍏寵瀹?filter鍏冪礌闄や簡涓嬮潰浠嬬粛鐨勭殑瀛愬厓绱犱箣澶?榪樺寘鎷?lt;servlet>浠嬬粛榪囩殑<icon>,<display-name>
,<description>,<init-param>,鍏剁敤閫斾竴鏍?
<filter-name>Filter鐨勫悕縐?lt;/filter-name>
瀹氫箟Filter鐨勫悕縐?
<filter-class>Filter鐨勭被鍚嶇О</filter-class>
瀹氫箟Filter鐨勭被鍚嶇О.渚嬪:com.foo.hello

鑼冧緥:

   1: <filter>
   2:   <filter-name>setCharacterEncoding</filter-name>
   3:   <filter-class>coreservlet.javaworld.CH11.SetCharacterEncodingFilter</filter-class>
   4:   <init-param>
   5:      <param-name>encoding</param-name>
   6:      <param-value>GB2312</param-value>
   7:   </init-param>
   8: </filter> 
   9:  
  10: <filter-mapping>

鍙堝Struts2鍙互鍦ㄨ繖閲岃filter

   1: <filter>
   2:     <filter-name>struts2</filter-name>
   3:     <filter-class>org.apache.struts2.dispatcher.FilterDispatcher
   4:     </filter-class>
   5:     <init-param>
   6:         <param-name>config</param-name>
   7:         <param-value>struts-default.xml,struts-plugin.xml,struts/struts.xml</param-value>
   8:     </init-param>
   9: </filter>
  10:  
  11: <filter-mapping>
  12:     <filter-name>struts2</filter-name>
  13:     <url-pattern>*.do</url-pattern>
  14: </filter-mapping>

 


 

<filter-mapping>

______________________________________

filter-mapping 鍏冪礌鐨勪袱涓富瑕佸瓙鍏冪礌filter-name鍜寀rl-pattern.鐢ㄦ潵瀹氫箟Filter鎵瀵瑰簲鐨刄RL.
<filter-name>Filter鐨勫悕縐?lt;/filter-name>
瀹氫箟Filter鐨勫悕縐?
<url-pattern>URL</url-pattern>
Filter鎵瀵瑰簲鐨凴UL.渚嬪:<url-pattern>/Filter/Hello</url-pattern>

<servlet-name>Servlet鐨勫悕縐?lt;servlet-name>
瀹氫箟servlet鐨勫悕縐?
<dispatcher>REQUEST|INCLUDE|FORWARD|ERROR</disaptcher>
璁懼畾Filter瀵瑰簲鐨勮姹傛柟寮?鏈塕QUEST,INCLUDE,FORWAR,ERROR鍥涚,榛樿涓篟EQUEST.
</filter-mapping>
鑼冧緥:

   1: <filter-mapping>
   2:    <filter-name>GZIPEncoding</filter-name>
   3:    <url-pattern>/*</url-pattern>
   4: </filter-mapping> 

 

 

 

<servlet>

___________________________________________

<servlet-name>servlet鐨勫悕縐?lt;/servlet-name>

<display-name>鏄劇ず鍚嶇О</display-name>
<servlet-class>servlet瀵瑰簲鐨刢lass鍚?lt;/servlet-class>

鑼冧緥錛?/p>

   1: <servlet>
   2:     <servlet-name>org.apache.jsp.index_jsp</servlet-name>
   3:     <servlet-class>org.apache.jsp.index_jsp</servlet-class>
   4: </servlet>

 

 

 

<servlet-mapping>
_____________________________________________
servlet-mapping鍏冪礌鍖呭惈涓や釜瀛愬厓绱爏ervlet-name鍜寀rl-pattern.鐢ㄦ潵瀹氫箟servlet鎵瀵瑰簲URL.
<servlet-name>Servlet鐨勫悕縐?lt;/servlet-name>
瀹氫箟Servlet鐨勫悕縐?
<url-pattern>Servlet URL</url-pattern>
瀹氫箟Servlet鎵瀵瑰簲鐨凴UL.渚嬪:<url-pattern>/Servlet/Hello</url-pattern>
</servlet-mapping>
鑼冧緥:

   1: <servlet-mapping>
   2:    <servlet-name>LoginChecker</servlet-name>
   3:    <url-pattern>/LoginChecker</url-pattern>
   4: </servlet-mapping> 

 

 

 

<listener>
___________________________________________
<listener>
listener鍏冪礌鐢ㄦ潵瀹氫箟Listener鎺ュ彛,瀹冪殑涓昏瀛愬厓绱犱負<listener-class>
<listen-class>Listener鐨勭被鍚嶇О</listener-class>
瀹氫箟Listener鐨勭被鍚嶇О.渚嬪: com.foo.hello
<listener>
鑼冧緥:

   1: <listener>
   2:   <listener-class>coreservlet.javaworld.CH11.ContenxtListener</listener-class>
   3: </listener> 

鍙堝Spring framework鍙互鍦ㄨ繖閲岃listener

   1: <listener>
   2:     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   3: </listener>

 

 

 

<session-cofing>
__________________________________
<session-config>
session-config鍖呭惈涓涓瓙鍏冪礌session-timeout.瀹氫箟web绔欏彴涓殑session鍙傛暟.
<session-timeout>鍒嗛挓</session-timeout>
瀹氫箟榪欎釜web绔欏彴鎵鏈塻ession鐨勬湁鏁堟湡闄?鍗曚綅涓哄垎閽?
</session-config>
鑼冧緥:

   1: <session-config>
   2:    <session-timeout>20</session-timeout>
   3: </session-config> 


 

 

 

<mime-mapping>
___________________________________________________
<mima-mapping>
mime-mapping鍖呭惈涓や釜瀛愬厓绱爀xtension鍜宮ime-type.瀹氫箟鏌愪竴涓墿灞曞悕鍜屾煇涓MIME Type鍋氬鏄?
<extension>鎵╁睍鍚嶅悕縐?lt;/extension>
鎵╁睍鍚嶇О
<mime-type>MIME鏍煎紡</mime-type>
MIME鏍煎紡.
</mime-mapping>
鑼冧緥:

   1: <mime-mapping>
   2:    <extension>doc</extension>
   3:    <mime-type>application/vnd.ms-word</mime-type>
   4: </mime-mapping>
   5: <mime-mapping>
   6:    <extension>xls</extension>
   7:    <mime-type>application/vnd.ms-excel</mime-type>
   8: </mime-mapping>
   9: <mime-mapping>
  10:    <extension>ppt</extesnion>
  11:    <mime-type>application/vnd.ms-powerpoint</mime-type>
  12: </mime-mapping> 

 

 

 

<welcome-file-list>
_____________________________________________
<welcome-file-list>
welcome-file-list鍖呭惈涓涓瓙鍏冪礌welcome-file.鐢ㄦ潵瀹氫箟棣栭〉鍒楀崟.
<welcome-file>鐢ㄦ潵鎸囧畾棣栭〉鏂囦歡鍚嶇О</welcome-flie>
welcome-file鐢ㄦ潵鎸囧畾棣栭〉鏂囦歡鍚嶇О.鎴戜滑鍙互鐢?lt;welcome-file>鎸囧畾鍑犱釜棣栭〉,鑰屾湇鍔″櫒浼氫緷鐓ц瀹氱殑欏哄簭鏉ユ壘棣栭〉.
鑼冧緥:

   1: <welcome-file-list>
   2:   <welcome-file>index.jsp</welcome-file>
   3:   <welcome-file>index.htm</welcome-file>
   4: </welcome-file-list> 

 

 

 

<error-page>
_________________________
<error-page>
error-page鍏冪礌鍖呭惈涓変釜瀛愬厓绱爀rror-code,exception-type鍜宭ocation.灝嗛敊璇唬鐮?Error Code)鎴栧紓甯?Exception)鐨勭綾誨搴?br>鍒皐eb绔欏彴璧勬簮璺緞.
<error-code>閿欒浠g爜</error-code>
HTTP Error code,渚嬪: 404
<exception-type>Exception</exception-type>
涓涓畬鏁村悕縐扮殑Java寮傚父綾誨瀷
<location>/璺緞</location>
鍦╳eb绔欏彴鍐呯殑鐩稿叧璧勬簮璺緞
</error-page>
鑼冧緥:

   1: <error-page>
   2:    <error-code>404</error-code>
   3:    <location>/error404.jsp</location>
   4: </error-page>
   5: <error-page>
   6:    <exception-type>java.lang.Exception</exception-type>
   7:    <location>/except.jsp</location>
   8: </error-page> 

 

 

 

<jsp-config>
_______________________________________________
<jsp-config>
jsp-config鍏冪礌涓昏鐢ㄦ潵璁懼畾JSP鐨勭浉鍏抽厤緗?<jsp:config>鍖呮嫭<taglib>鍜?lt;jsp-property-group>涓や釜瀛愬厓绱?鍏朵腑<taglib>鍏冪礌
鍦↗SP 1.2鏃跺氨宸茬粡瀛樺湪浜?鑰?lt;jsp-property-group>鏄疛SP 2.0鏂板鐨勫厓绱?

<taglib>
taglib鍏冪礌鍖呭惈涓や釜瀛愬厓绱爐aglib-uri鍜宼aglib-location.鐢ㄦ潵璁懼畾JSP緗戦〉鐢ㄥ埌鐨凾ag Library璺緞.
<taglib-uri>URI</taglib-uri>
   taglib-uri瀹氫箟TLD鏂囦歡鐨刄RI,JSP緗戦〉鐨則aglib鎸囦護鍙互緇忕敱榪欎釜URI瀛樺彇鍒癟LD鏂囦歡.
<taglib-location>/WEB-INF/lib/xxx.tld</taglib-laction>
   TLD鏂囦歡瀵瑰簲Web绔欏彴鐨勫瓨鏀句綅緗?
</taglib>

<jsp-property-group>
jsp-property-group鍏冪礌鍖呭惈8涓厓绱?鍒嗗埆涓?
<description>Description</descrition>
姝よ瀹氱殑璇存槑

<display-name>Name</display-name>
姝よ瀹氱殑鍚嶇О

<url-pattern>URL</url-pattern>
璁懼畾鍊兼墍褰卞搷鐨勮寖鍥?濡?/CH2 鎴栬?*.jsp

<el-ignored>true|false</el-ignored>
鑻ヤ負true,琛ㄧず涓嶆敮鎸丒L璇硶.

<scripting-invalid>true|false</scripting-invalid>
鑻ヤ負true琛ㄧず涓嶆敮鎸?lt;%scription%>璇硶.

<page-encoding>encoding</page-encoding>
璁懼畾JSP緗戦〉鐨勭紪鐮?

<include-prelude>.jspf</include-prelude>
璁劇疆JSP緗戦〉鐨勬姮澶?鎵╁睍鍚嶄負.jspf

<include-coda>.jspf</include-coda>
璁劇疆JSP緗戦〉鐨勭粨灝?鎵╁睍鍚嶄負.jspf
</jsp-property-group>
</jsp-config>
鑼冧緥:

   1: <jsp-config>
   2: <taglib>
   3:    <taglib-uri>Taglib</taglib-uri>
   4:    <taglib-location>/WEB-INF/tlds/MyTaglib.tld</taglib-location>
   5: </taglib>
   6: <jsp-property-group>
   7:    <description>
   8:       Special property group for JSP Configuration JSP example.
   9:    </description>
  10:    <display-name>JSPConfiguration</display-name>
  11:    <uri-pattern>/*</uri-pattern>
  12:    <el-ignored>true</el-ignored>
  13:    <page-encoding>GB2312</page-encoding>
  14:    <scripting-inivalid>true</scripting-inivalid>
  15:    ............
  16: </jsp-property-group>
  17: </jsp-config> 

 

 

 

<resource-ref>
________________________________________________
<resource-ref>
resource-ref鍏冪礌鍖呮嫭浜斾釜瀛愬厓绱燿escription,res-ref-name,res-type,res-auth,res-sharing-scope.鍒╃敤JNDI鍙栧緱绔欑偣鍙?br>鍒╃敤璧勬簮.
<description>璇存槑</description>
璧勬簮璇存槑

<rec-ref-name>璧勬簮鍚嶇О</rec-ref-name>
璧勬簮鍚嶇О

<res-type>璧勬簮縐嶇被</res-type>
璧勬簮縐嶇被

<res-auth>Application|Container</res-auth>
璧勬簮鐢盇pplication鎴朇ontainer鏉ヨ鍙?

<res-sharing-scope>Shareable|Unshareable</res-sharing-scope>
璧勬簮鏄惁鍙互鍏變韓.榛樿鍊間負 Shareable
鑼冧緥:

   1: <resource-ref>
   2:    <description>JNDI JDBC DataSource of JSPBook</description>
   3:    <res-ref-name>jdbc/sample_db</res-ref-name>
   4:    <res-type>javax.sql.DataSoruce</res-type>
   5:    <res-auth>Container</res-auth>
   6: </resource-ref> 

榪欎簺閮芥槸浜涙瘮杈冨父鐢ㄧ殑,璇︾粏鍙互鐧誨綍: http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd



]]>
POJO2VOhttp://www.tkk7.com/charles/archive/2008/12/25/248329.htmlsuprasoft Inc,.suprasoft Inc,.Thu, 25 Dec 2008 12:13:00 GMThttp://www.tkk7.com/charles/archive/2008/12/25/248329.htmlhttp://www.tkk7.com/charles/comments/248329.htmlhttp://www.tkk7.com/charles/archive/2008/12/25/248329.html#Feedback0http://www.tkk7.com/charles/comments/commentRss/248329.htmlhttp://www.tkk7.com/charles/services/trackbacks/248329.html鏈榪戠敤Flex鍋歎I,浣嗘槸鍜屼笟鍔″眰涓嶅ソ緇撳悎錛岀壒鍦板啓浜嗕釜涓氬姟BO杞琕O鐨刢lass

鍙渶瑕佹寚瀹氶渶瑕佺敓鎴愮殑鐩綍錛屽氨鍙互鎵歸噺灝?BO.java杞崲涓?VO.as

浠g爜濡備笅錛?/p>

   1: /**
   2:  * 
   3:  */
   4: package com.suprasoft.utils.flex;
   5:  
   6: /**
   7:  * @浣滆?Charles <chio.yang@gmail.com> Suprasoft Inc.,
   8:  * 
   9:  * 2008-12-25
  10:  */
  11:  
  12: import java.io.BufferedWriter;
  13: import java.io.File;
  14: import java.io.FileWriter;
  15: import java.io.IOException;
  16: import java.lang.reflect.Field;
  17:  
  18: import org.apache.commons.lang.StringUtils;
  19:  
  20: public class POJO2VO {
  21:     public POJO2VO() {
  22:     }
  23:  
  24:     public static String getClassType(Class c) {
  25:         String typeName = c.getSimpleName();
  26: //        System.out.println("typename " + typeName);
  27:         // 鏁板煎瀷鐨勯兘杞垚Number
  28:         if (typeName.equals("BigDecimal") || typeName.equals("Decimal")
  29:                 || typeName.equals("Double") || typeName.equals("int")
  30:                 || typeName.equals("Integer") || typeName.equals("Long")
  31:                 || typeName.equals("long")) {
  32:             return "Number";
  33:         } else if (typeName.equals("Boolean")) {
  34:             return "boolean";
  35:         } else if (typeName.equals("Set")) {
  36:             return "Array";
  37:         } else {
  38:             if (isBasicType(typeName)) {
  39:                 return typeName;// 鍏跺畠綾誨瀷鐨勮緗負鏈煡綾誨瀷
  40:             } else {
  41:                 return typeName + "VO";// 鑷畾涔夌被鍨嬬殑錛屽姞涓奦O緇撳熬
  42:             }
  43:         }
  44:  
  45:     }
  46:  
  47:     // 鏄惁鍩烘湰鐨勬暟鎹被鍨?/span>
  48:     public static boolean isBasicType(String type) {
  49:         return type.equals("String") || type.equals("BigDecimal")
  50:                 || type.equals("Decimal") || type.equals("Double")
  51:                 || type.equals("int") || type.equals("Integer")
  52:                 || type.equals("Boolean") || type.equals("Set")
  53:                 || type.equals("Long") || type.equals("long")
  54:                 || type.equals("Date");
  55:     }
  56:  
  57:     public static String repeat(String c, int count) {
  58:         String temp = "";
  59:         for (int i = 0; i < count; i++) {
  60:             temp += c;
  61:         }
  62:  
  63:         return temp;
  64:     }
  65:     
  66:     public static void makeDirByPackageName(String rootFolder, String packageName) {
  67:  
  68:         File folder = new File(rootFolder + "\\" + packageName.replace(".", "\\"));
  69:         if(!folder.exists()) {
  70:             folder.mkdirs();
  71:         }
  72:     }
  73:     
  74:     public static void generateAsFiles(String pojoQualifiedName ){
  75:         
  76:     }
  77:  
  78:     /**
  79:      * 鐢熸垚as鏂囦歡
  80:      * 
  81:      * @param pojoQualifiedName
  82:      * @param voPackageName
  83:      * @param folders
  84:      * @throws ClassNotFoundException
  85:      * @throws IOException
  86:      */
  87:     public static void generateAsFile(String pojoQualifiedName, String voPackageRootFolder, String voPackageName) throws ClassNotFoundException, IOException {
  88:         //pojoName蹇呴』甯﹀寘鍚嶇殑Qualified Name
  89:         Class c = Class.forName(pojoQualifiedName);
  90:         Field[] fields = c.getDeclaredFields();
  91:  
  92:         POJO2VO.makeDirByPackageName(voPackageRootFolder, voPackageName);
  93:         // as鐨剉o瀵硅薄鍚嶇О緇撳熬鍔犱笂VO鏍囧織
  94:         File f = new File(voPackageRootFolder + "\\" 
  95:                         + voPackageName.replace(".", "\\") + "\\"
  96:                         + c.getSimpleName().replace("BO", "VO") + ".as");
  97:         
  98:         BufferedWriter bw = new BufferedWriter(new FileWriter(f));
  99:         // 鍖呭悕錛屾病鏈夎緗寘鍚嶅氨鍙栧拰java pojo涓鏍風殑鍖呭悕
 100:         if (StringUtils.isEmpty(voPackageName)) {
 101:             bw.write("package " + c.getPackage().getName() + "\n{\n");
 102:         } else {
 103:             bw.write("package " + voPackageName + "\n{\n");
 104:         }
 105:  
 106:         // 鍐欑被
 107:         bw.write(repeat(" ", 4) + "public class " + c.getSimpleName().replace("BO", "VO") + "\n");
 108:         bw.write(repeat(" ", 4) + "{\n");
 109:  
 110:         // 鍐欏睘鎬?/pre>
 111:         for (int i = 0; i < fields.length; i++) {
 112:             Class fieldType = fields[i].getType();
 113:             String typeName = getClassType(fieldType);
 114:             bw.write(repeat(" ", 8) + "private var _" + fields[i].getName()
 115:                     + ":" + typeName + ";\n");
 116:         }
 117:  
 118:         bw.write("\n\n\n");
 119:         // 鍐欑┖鐨勬瀯閫犲嚱鏁?/pre>
 120:         bw.write(repeat(" ", 8) + "public function " + c.getSimpleName().replace("BO", "VO")
 121:                 + "(){}\n\n");
 122:  
 123:         // 鍐?setter/getter 鏂規硶
 124:         for (int i = 0; i < fields.length; i++) {
 125:             Class fieldType = fields[i].getType();
 126:             String typeName = getClassType(fieldType);
 127:             // setter
 128:             bw.write(repeat(" ", 8) + "public function set "
 129:                     + fields[i].getName() + "(value:" + typeName + "):void{\n");
 130:             bw.write(repeat(" ", 12) + "this._" + fields[i].getName()
 131:                     + " = value;\n");
 132:             bw.write(repeat(" ", 8) + "}\n\n");
 133:             // getter
 134:             bw.write(repeat(" ", 8) + "public function get "
 135:                     + fields[i].getName() + "():" + typeName + "{\n");
 136:             bw.write(repeat(" ", 12) + "return this._" + fields[i].getName()
 137:                     + ";\n");
 138:             bw.write(repeat(" ", 8) + "}\n\n\n");
 139:  
 140:         }
 141:         bw.write(repeat(" ", 4) + "}\n");
 142:         bw.write("}");
 143:         bw.close();
 144:     }
 145:     
 146:     public static void generateAsFileBatch(String pojoPackageRootFolder, String pojoPackageName, String voPackageRootFolder, String voPackageName) throws ClassNotFoundException, IOException {
 147:         String packageFolder = pojoPackageRootFolder + "\\" + pojoPackageName.replace(".", "\\");
 148:         File dir = new File(packageFolder);
 149:         File[] files = dir.listFiles();
 150:         for(File file : files){
 151:             if(file.isDirectory()) continue;
 152:             
 153:             if(file.getName().endsWith("BO.java")){
 154:                 String pojoName = pojoPackageName + "." + file.getName().replace(".java", "");
 155:                 POJO2VO.generateAsFile(pojoName, voPackageRootFolder, voPackageName);
 156:             }
 157:         }
 158:     }
 159:  
 160:  
 161:     /*
 162:      * 嫻嬭瘯
 163:      */
 164:     public static void main(String[] args) throws ClassNotFoundException, IOException {
 165:         
 166: //        String[] pojos = { "com.bankcomm.icms.domain.migrate.RawCollateralBasicBO" };
 167: //        for (int i = 0; i < pojos.length; i++) {
 168: //            POJO2VO.generateAsFile(pojos[i], "C:", "com.bankcomm.icms.domain");
 169: //        }
 170:  
 171:         POJO2VO.generateAsFileBatch("D:\\ICMS\\eclipse\\workspace\\Utils\\src\\", 
 172:                 "com.bankcomm.icms.domain.migrate", 
 173:                 "C:\\Documents and Settings\\Administrator\\My Documents\\Flex Builder 3\\Temp\\src", 
 174:                 "com.bankcomm.icms.domain");
 175:     }
 176: }


]]>
主站蜘蛛池模板: 3344在线看片免费| 免费国产在线观看| www亚洲精品少妇裸乳一区二区 | 日韩一级在线播放免费观看| 国产精品日本亚洲777| 性xxxx视频播放免费| jlzzjlzz亚洲jzjzjz| 国产一级淫片a视频免费观看| 亚洲一区二区三区久久| 美女视频黄a视频全免费| 日本黄页网址在线看免费不卡| 免费国产在线观看| 2021精品国产品免费观看| 看免费毛片天天看| 国产亚洲精久久久久久无码AV| 一区二区三区免费在线视频| 亚洲国产片在线观看| 亚洲伊人久久成综合人影院| 中文字幕永久免费视频| 亚洲AV成人无码天堂| 国产AV无码专区亚洲AV毛网站| 免费人妻无码不卡中文字幕系| 精品日韩亚洲AV无码| 国产成人精品免费午夜app| 一级成人a免费视频| 国产精品亚洲一区二区麻豆| 亚洲AV无码一区二区二三区入口| 日韩人妻一区二区三区免费| 男男gay做爽爽的视频免费| 亚洲AV无码久久久久网站蜜桃| 日韩a级毛片免费观看| 亚洲国产精品免费视频| 久久精品成人免费观看97| 亚洲国产精品自在在线观看| 亚洲国产成人久久一区WWW| 午夜免费福利在线观看| 波多野结衣中文字幕免费视频| 亚洲av午夜电影在线观看| 亚洲无人区午夜福利码高清完整版| 日本免费大黄在线观看| 亚洲欧洲无码一区二区三区|