锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美性猛交xxxx黑人交,色鬼7777久久,亚洲第一视频网http://www.aygfsteel.com/xiaohuzi2008/category/53030.html闈㈡湞澶ф搗錛屾槬鏆栬姳寮zh-cnThu, 06 Jun 2013 17:04:44 GMTThu, 06 Jun 2013 17:04:44 GMT60銆愯漿銆慡ervlet鍜孎ilter鐨剈rl鍖歸厤浠ュ強url-pattern璇﹁Вhttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/06/06/400301.html灝忚儭瀛?/dc:creator>灝忚儭瀛?/author>Thu, 06 Jun 2013 07:16:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/06/06/400301.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/400301.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/06/06/400301.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/400301.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/400301.html     

Servlet鍜孎ilter鐨剈rl鍖歸厤浠ュ強url-pattern璇﹁В


     Servlet鍜宖ilter鏄疛2EE寮鍙戜腑甯哥敤鐨勬妧鏈紝浣跨敤鏂逛究錛岄厤緗畝鍗曪紝鑰佸皯鐨嗗疁銆備及璁″ぇ澶氭暟鏈嬪弸閮芥槸鐩存帴閰嶇疆鐢紝涔熸病鏈夊叧蹇冭繃鍏蜂綋鐨勭粏鑺傦紝浠婂ぉ 閬囧埌涓涓棶棰橈紝涓婄綉鏌ヤ簡servlet鐨勮鑼冩墠鍙戠幇錛宻ervlet鍜宖ilter涓殑url-pattern榪樻槸鏈変竴浜涙枃绔犲湪閲岄潰鐨勶紝鎬葷粨浜嗕竴浜涗笢瑗匡紝 鏀懼嚭鏉ヤ緵澶у鍙傝冿紝浠ュ厤閬囧埌闂鍙堣嫻垂鏃墮棿銆?/div>

涓 servlet瀹瑰櫒瀵箄rl鐨勫尮閰嶈繃


褰撲竴涓姹傚彂閫佸埌servlet瀹瑰櫒鐨勬椂鍊欙紝瀹瑰櫒鍏堜細灝嗚姹傜殑url鍑忓幓褰撳墠搴旂敤涓婁笅鏂囩殑璺緞浣滀負servlet鐨勬槧灝剈rl錛屾瘮濡傛垜璁塊棶鐨勬槸http://localhost/test/aaa.html錛屾垜鐨勫簲鐢ㄤ笂涓嬫枃鏄痶est錛屽鍣ㄤ細灝唄ttp://localhost/test鍘繪帀錛屽墿涓嬬殑/aaa.html閮ㄥ垎鎷挎潵鍋歴ervlet鐨勬槧灝勫尮閰嶃傝繖涓槧灝勫尮閰嶈繃紼嬫槸鏈夐『搴忕殑錛岃屼笖褰撴湁涓涓猻ervlet鍖歸厤鎴愬姛浠ュ悗錛屽氨涓嶄細鍘葷悊浼氬墿涓嬬殑servlet浜嗭紙filter涓嶅悓錛屽悗鏂囦細鎻愬埌錛夈傚叾鍖歸厤瑙勫垯鍜岄『搴忓涓嬶細<o:p></o:p>

1.     綺劇‘璺緞鍖歸厤銆備緥瀛愶細姣斿servletA 鐨剈rl-pattern涓?nbsp;/test錛宻ervletB鐨剈rl-pattern涓?nbsp;/* 錛岃繖涓椂鍊欙紝濡傛灉鎴戣闂殑url涓篽ttp://localhost/test 錛岃繖涓椂鍊欏鍣ㄥ氨浼氬厛榪涜綺劇‘璺緞鍖歸厤錛屽彂鐜?test姝eソ琚玸ervletA綺劇‘鍖歸厤錛岄偅涔堝氨鍘昏皟鐢╯ervletA錛屼篃涓嶄細鍘葷悊浼氬叾浠栫殑servlet浜嗐?lt;o:p></o:p>

2.     鏈闀胯礬寰勫尮閰嶃備緥瀛愶細servletA鐨剈rl-pattern涓?test/*錛岃宻ervletB鐨剈rl-pattern涓?test/a/*錛屾鏃惰闂甴ttp://localhost/test/a鏃訛紝瀹瑰櫒浼氶夋嫨璺緞鏈闀跨殑servlet鏉ュ尮閰嶏紝涔熷氨鏄繖閲岀殑servletB銆?lt;o:p></o:p>

3.     鎵╁睍鍖歸厤錛屽鏋渦rl鏈鍚庝竴孌靛寘鍚墿灞曪紝瀹瑰櫒灝嗕細鏍規嵁鎵╁睍閫夋嫨鍚堥傜殑servlet銆備緥瀛愶細servletA鐨剈rl-pattern錛?.action<o:p></o:p>

4.     濡傛灉鍓嶉潰涓夋潯瑙勫垯閮芥病鏈夋壘鍒頒竴涓猻ervlet錛屽鍣ㄤ細鏍規嵁url閫夋嫨瀵瑰簲鐨勮姹傝祫婧愩傚鏋滃簲鐢ㄥ畾涔変簡涓涓猟efault servlet錛屽垯瀹瑰櫒浼氬皢璇鋒眰涓㈢粰default servlet錛堜粈涔堟槸default servlet錛熷悗闈細璁詫級銆?br />

鏍規嵁榪欎釜瑙勫垯琛紝灝辮兘寰堟竻妤氱殑鐭ラ亾servlet鐨勫尮閰嶈繃紼嬶紝鎵浠ュ畾涔塻ervlet鐨勬椂鍊欎篃瑕佽冭檻url-pattern鐨勫啓娉曪紝浠ュ厤鍑洪敊銆?

      瀵逛簬filter錛屼笉浼氬儚servlet閭f牱鍙尮閰嶄竴涓猻ervlet錛屽洜涓篺ilter鐨勯泦鍚堟槸涓涓摼錛屾墍浠ュ彧浼氭湁澶勭悊鐨勯『搴忎笉鍚岋紝鑰屼笉浼氬嚭鐜板彧閫夋嫨涓 涓猣ilter銆侳ilter鐨勫鐞嗛『搴忓拰filter-mapping鍦╳eb.xml涓畾涔夌殑欏哄簭鐩稿悓銆?/p>


浜?url-pattern璇﹁В

  • 鍦?/span>web.xml鏂囦歡涓紝浠ヤ笅璇硶鐢ㄤ簬瀹氫箟鏄犲皠錛?/span>
  •  浠?#8221;/’寮澶村拰浠?#8221;/*”緇撳熬鐨勬槸鐢ㄦ潵鍋氳礬寰勬槧灝勭殑銆?/li>
  •  浠ュ墠緙”*.”寮澶寸殑鏄敤鏉ュ仛鎵╁睍鏄犲皠鐨勩?/li>
  • “/” 鏄敤鏉ュ畾涔塪efault servlet鏄犲皠鐨勩?/li>
  • 鍓╀笅鐨勯兘鏄敤鏉ュ畾涔夎緇嗘槧灝勭殑銆傛瘮濡傦細 /aa/bb/cc.action
鎵浠ワ紝涓轟粈涔堝畾涔?#8221;/*.action”榪欐牱涓涓湅璧鋒潵寰堟甯哥殑鍖歸厤浼氶敊錛熷洜涓鴻繖涓尮閰嶅嵆灞炰簬璺緞鏄犲皠錛屼篃灞炰簬鎵╁睍鏄犲皠錛屽鑷村鍣ㄦ棤娉曞垽鏂?/div>
鍑鴻嚜錛?div>http://foxty.iteye.com/blog/39332




]]>
[杞琞CXF鑴辯Spring榪愯http://www.aygfsteel.com/xiaohuzi2008/archive/2013/01/24/394713.html灝忚儭瀛?/dc:creator>灝忚儭瀛?/author>Thu, 24 Jan 2013 08:30:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/01/24/394713.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/394713.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2013/01/24/394713.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/394713.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/394713.html

CXF鍜孲pring緇撳悎鐨勯潪甯哥揣瀵嗭紝榛樿鍙戝竷Server绔槸闇瑕佺敤鍒癝pring鐨勶紝浣嗘槸欏圭洰涓敤鍒扮殑Spring jar鍖呮瘮杈冭?.0錛孋XF鐗堟湰2.3.1錛岃窡Spring涓嶅吋瀹癸紝闇瑕佹崲涔楽pring2.5錛屼絾鏄崲jar鍖呭鍘熸潵鐨勯」鐩瓨鍦ㄩ闄╋紝涓婄綉鎼滀簡涓涓劚 紱籗pring榪愯鐨勬柟娉曘?/p>

 

鍐欎竴涓被緇ф壙CXFNonSpringServlet錛岄噸鍐檒oadBus鏂規硶銆?/p>

 1 @SuppressWarnings("unchecked")
 2     public void loadBus(ServletConfig servletConfig) throws ServletException {
 3         super.loadBus(servletConfig);
 4         Bus bus = this.getBus();
 5         BusFactory.setDefaultBus(bus);
 6         
 7         Enumeration<String> enums = getInitParameterNames();
 8         while (enums.hasMoreElements()) {
 9             String key = enums.nextElement();
10             String value = getInitParameter(key);
11             try {
12                 Class clz = Class.forName(value);
13                 try {
14                     Endpoint.publish(key, clz.newInstance());
15                 } catch (InstantiationException e) {
16                     e.printStackTrace();
17                 } catch (IllegalAccessException e) {
18                     e.printStackTrace();
19                 }
20             } catch (ClassNotFoundException e) {
21                 e.printStackTrace();
22             }
23         }
24     }

鍦╳eb.xml閲屽皢瑕佸彂甯冪殑綾婚厤緗竴涓嬶紝鍙互閰嶇疆澶氫釜

 1     <servlet>  
 2              <servlet-name>CXFServlet</servlet-name>  
 3              <servlet-class>  
 4                   com.infodms.ws.util.MyCXFNoSpringServlet  
 5              </servlet-class>  
 6              <init-param>  
 7                 <param-name>/TestService</param-name>  
 8                 <param-value>com.infodms.ws.test.TestServiceImpl</param-value>  
 9              </init-param>  
10              <init-param>  
11                 <param-name>/HelloWorld</param-name>  
12                 <param-value>com.infodms.ws.test.HelloWorldImpl</param-value>  
13              </init-param>  
14          </servlet>  
15          <servlet-mapping>  
16              <servlet-name>CXFServlet</servlet-name>  
17              <url-pattern>/ws/*</url-pattern>  
18          </servlet-mapping> 

閰嶇疆瀹屾垚錛屽惎鍔╰omcat錛屾姤閿欙紝榪樻槸鍔犺澆浜唖pring錛屼絾鏄唬鐮佺‘瀹炶蛋浜嗗垰鍒氬姞鐨凪yCXFNoSpringServlet

1     java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.bus.spring.BusApplicationListener' defined in class path resource [META-INF/cxf/cxf.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.context.support.AbstractApplicationContext.addApplicationListener(Lorg/springframework/context/ApplicationListener;)V  
2         org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96) 

璋冭瘯浜嗕竴涓嬫簮鐮侊紝鍐呴儴闇瑕佷粠鐜鍙橀噺涓彇寰梠rg.apache.cxf.bus.factory鐨勫鹼紝濡傛灉涓虹┖灝遍粯璁ゆ寜鐓pring鐨勬柟寮忓姞杞姐備簬鏄湪綾葷殑鏈寮濮嬪姞鍏ヤ竴琛屼唬鐮?/div>
1 System.setProperty("org.apache.cxf.bus.factory""org.apache.cxf.bus.CXFBusFactory"); 

鍐嶆鍚姩tomcat錛屾姤閿欙紝鐢卞紓甯稿彲鐭oodstoxValidationImpl綾繪病鏈夐粯璁ゆ瀯閫犳柟娉曪紝閫氳繃鍙嶅皠瀹炰緥鍖栧璞℃姤閿欙紝鐪嬩簡涓涓嬭繖涓被鐨勬簮鐮侊紝紜疄娌℃湁鏃犲弬鏋勯犳柟娉?/div>
1     Caused by: java.lang.InstantiationException: org.apache.cxf.wstx_msv_validation.WoodstoxValidationImpl   
2             at java.lang.Class.newInstance0(Class.java:340)   
3             at java.lang.Class.newInstance(Class.java:308)   
4             at org.apache.cxf.bus.extension.Extension.load(Extension.java:110)  


http://cxf.547215.n5.nabble.com/jira-Created-CXF-3077-java-lang-InstantiationException-org-apache-cxf-wstx-msv-validation-WoodstoxVal-td3228305.html

寮曠敤榪欎釜錛屽姞鍏ヤ笁涓猨ar鍖?/p>

woodstox-core-asl-4.0.8.jar 
stax2-api-3.0.2.jar
msv.jar

 

闂瑙e喅銆?/p>

鍘熸枃鍑鴻嚜錛?div>http://liuqiang5151.iteye.com/blog/840496


]]>Spring mvc Webservice 涓嶅厑璁擱噸杞芥柟娉?/title><link>http://www.aygfsteel.com/xiaohuzi2008/archive/2013/01/09/394006.html</link><dc:creator>灝忚儭瀛?/dc:creator><author>灝忚儭瀛?/author><pubDate>Wed, 09 Jan 2013 02:10:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaohuzi2008/archive/2013/01/09/394006.html</guid><wfw:comment>http://www.aygfsteel.com/xiaohuzi2008/comments/394006.html</wfw:comment><comments>http://www.aygfsteel.com/xiaohuzi2008/archive/2013/01/09/394006.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/394006.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/394006.html</trackback:ping><description><![CDATA[<div>涓ラ噸: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener</div><div>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ResourceService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.IllegalArgumentException: An operation with name [####] already exists in this service<br /><br />鍙兘鏄洜涓篧ebService 瀛樺湪閲嶈澆鐨勬柟娉曪紝鍥犳鍒濆鍖栨椂Spring鏃犳硶鎵懼埌瀵瑰簲鐨勬柟娉?br />浣跨敤鐨勬彃浠朵負錛?div>javax.jws-1.0.0_JDK1.5_1.0.0.jar<br /><div>cxf-bundle-2.5.2.jar<br /><div>spring-webmvc-3.1.1.RELEASE.jar</div></div></div></div><img src ="http://www.aygfsteel.com/xiaohuzi2008/aggbug/394006.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaohuzi2008/" target="_blank">灝忚儭瀛?/a> 2013-01-09 10:10 <a href="http://www.aygfsteel.com/xiaohuzi2008/archive/2013/01/09/394006.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>SpringMVC妗嗘灦浠嬬粛 http://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/24/383833.html灝忚儭瀛?/dc:creator>灝忚儭瀛?/author>Tue, 24 Jul 2012 05:52:00 GMThttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/24/383833.htmlhttp://www.aygfsteel.com/xiaohuzi2008/comments/383833.htmlhttp://www.aygfsteel.com/xiaohuzi2008/archive/2012/07/24/383833.html#Feedback0http://www.aygfsteel.com/xiaohuzi2008/comments/commentRss/383833.htmlhttp://www.aygfsteel.com/xiaohuzi2008/services/trackbacks/383833.html闃呰鍏ㄦ枃

]]>
主站蜘蛛池模板: 太康县| 泽库县| 中西区| 延津县| 高雄市| 正定县| 全南县| 西畴县| 安平县| 德州市| 伊宁市| 保靖县| 镇远县| 湘潭县| 叶城县| 五莲县| 太康县| 莲花县| 乌拉特中旗| 承德市| 浦城县| 伊宁县| 昭平县| 砀山县| 剑川县| 突泉县| 印江| 自治县| 泰兴市| 钟山县| 太谷县| 丹寨县| 调兵山市| 腾冲县| 怀仁县| 来安县| 德兴市| 石首市| 将乐县| 余干县| 龙游县|