锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲A∨精品一区二区三区,亚洲av无码一区二区三区四区 ,亚洲最大的成人网http://www.tkk7.com/Noah/category/37836.html<span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri" lang="ZH-CN">涓嶆槸緇忓吀鎴戜笉鍙?lt;/span>zh-cnMon, 20 Feb 2012 18:58:24 GMTMon, 20 Feb 2012 18:58:24 GMT60涓や釜portlet涔嬮棿璺寵漿騫朵紶鍊?/title><link>http://www.tkk7.com/Noah/articles/362185.html</link><dc:creator>鐪奸暅铔?/dc:creator><author>鐪奸暅铔?/author><pubDate>Thu, 27 Oct 2011 10:36:00 GMT</pubDate><guid>http://www.tkk7.com/Noah/articles/362185.html</guid><wfw:comment>http://www.tkk7.com/Noah/comments/362185.html</wfw:comment><comments>http://www.tkk7.com/Noah/articles/362185.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Noah/comments/commentRss/362185.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Noah/services/trackbacks/362185.html</trackback:ping><description><![CDATA[     鎽樿: 鍦ㄤ笉鍚岀殑Portlet涔嬮棿浼犲弬鏁幫紝榪欐兂榪欐槸鎵鏈夌敤Liferay鐨勪漢閮芥兂瀹炵幇鐨勶紝浣嗗湪浠ュ墠鐨勭増鏈腑紜疄鍋氫笉鍒般傜幇鍦ㄧ殑鐗堟湰鍙互浜嗭紝騫朵笖寰堢畝鍗?  棣栧厛錛屾墦寮portlet.xml鏂囦歡錛屾壘鍒頒綘鎯沖疄鐜頒紶鍊煎拰鎺ユ敹鍊肩殑portlet鐗囨錛屽湪姣忎釜鐗囨涓姞涓婁笅闈㈣繖琛屼唬鐮侊細(xì) <supported-public-render-parameter>鍙傛暟鍚?lt;/supported-publi...  <a href='http://www.tkk7.com/Noah/articles/362185.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/Noah/aggbug/362185.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Noah/" target="_blank">鐪奸暅铔?/a> 2011-10-27 18:36 <a href="http://www.tkk7.com/Noah/articles/362185.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Connect to second database in Liferay(榪炴帴絎簩涓暟鎹簱)http://www.tkk7.com/Noah/articles/362178.html鐪奸暅铔?/dc:creator>鐪奸暅铔?/author>Thu, 27 Oct 2011 09:56:00 GMThttp://www.tkk7.com/Noah/articles/362178.htmlhttp://www.tkk7.com/Noah/comments/362178.htmlhttp://www.tkk7.com/Noah/articles/362178.html#Feedback0http://www.tkk7.com/Noah/comments/commentRss/362178.htmlhttp://www.tkk7.com/Noah/services/trackbacks/362178.html鍚屾椂榪炴帴涓や釜鏁版嵁搴擄紝榪炴帴澶氫釜鏁版嵁搴?/font>

榪欐槸鎴戣嚜宸辯爺絀跺嚭鏉ョ殑錛岀湡鐨勫彲浠ヨ鏄笘鐣岄鍙戜簡錛岀綉涓婁篃鏈変竴浜涗緥瀛愶紝閮借涔堝氨鏄佺増鏈紝瑕佷箞灝辯壒澶嶆潅銆傛垜鐨勮繖涓柟娉曠壒綆鍗曪紝甯屾湜瀵瑰ぇ瀹舵湁鐢紝涔熷笇鏈涘ぇ瀹剁弽鎯?/font>

鍥犱負(fù)鍏徃鐨勯渶瑕侊紝鐩存帴鍐欑殑鑻辨枃鐗堢殑錛屼笉鎯沖啀緲昏瘧鍥炴潵浜嗐傞兘涓嶉毦鐞嗚В錛屼竴鐪嬪氨鑳芥槑鐧姐備笉鎳傜殑璇風(fēng)暀璦

Introduction

                First of all, I should say that setting liferay to connect to another database is very easy. Certainty, all of things to make easy always after numerous attempts . I searched several solutions from website before. But, not only for old version but also too complex.  As my understand  According to original source, and several trial. I found the way. And I think that it is the World Premiere.^_^

 

Prerequisites

You should know how to create services with Service Builder, Also You should know how to create new portlet. how to link to database and  how it is used inside programming language code.

The steps described here were performed over Liferay 6.0.6.

 

 

Let us Beginning

1.       Create a file named portal-ext.properties in {WEBSERVER-HOME}\webapps\ROOT\WEB-INF\classes. And type the following code:

    #
    # MySQL
    #
    jdbc.default.driverClassName
=com.mysql.jdbc.Driver
    jdbc.default.url
=jdbc:mysql://localhost/lfportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
    jdbc.default.username
=root
    jdbc.default.password
=root  
  
    #
    # This is the second connection
    #
    jdbc.second.driverClassName
=net.sourceforge.jtds.jdbc.Driver
    jdbc.second.url
=jdbc:jtds:sqlserver://localhost:1433/extraDB
    jdbc.second.username
=sa
    jdbc.second.password
=test

 

2.       Create a service.xml file. And type the following code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
<service-builder package-path="com.test">
    
<author>noah.xiang</author>
    
<namespace>nx</namespace>

    
<entity name="MyTable" local-service="true" remote-service="false" table="myTable" data-source="secondDataSource" session-factory="secondSessionFactory" tx-manager="secondTransactionManager">
        
<!-- PK fields -->

        
<column name="id" type="int" primary="true" />

        
<!-- Audit fields -->

        
<column name="jahr" type="Date" mapping-key="[Jahr]"/>
        
<column name="beschaffungsstrategie" type="String"  mapping-key="[Beschaffungsstrategie]"/>
        
<column name="buchVon" type="String" mapping-key="[Buch von]"/>
        
    
</entity>
</service-builder>

 

3.       Ant build-service.xml, let liferay to generate code.

4.       Create a new file named ext-spring.xml in src\META-INF folder. And copy the following code:

 

<?xml version="1.0"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
    
<bean id="secondDataSource" class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy" lazy-init="true">
        
<property name="targetDataSource">
            
<bean class="com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean">
                
<property name="propertyPrefix" value="jdbc.second." />
            
</bean>
        
</property>
    
</bean>
    
<bean id="secondHibernateSessionFactory" class="com.liferay.portal.spring.hibernate.PortalHibernateConfiguration" lazy-init="true">
        
<property name="dataSource">
            
<ref bean="secondDataSource" />
        
</property>
        
<property name="mappingResources">
            
<list>
                
<value>META-INF/portlet-hbm.xml</value>
            
</list>
        
</property>
    
</bean>
    
<bean id="secondSessionFactory" class="com.liferay.portal.dao.orm.hibernate.SessionFactoryImpl" lazy-init="true">
        
<property name="sessionFactoryImplementor">
            
<ref bean="secondHibernateSessionFactory" />
        
</property>
    
</bean>
    
<bean id="secondTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager" lazy-init="true">
        
<property name="dataSource">
            
<ref bean="secondDataSource" />
        
</property>
        
<property name="sessionFactory">
            
<ref bean="secondHibernateSessionFactory" />
        
</property>
    
</bean>
</beans>

 

5.       No more. So easy right? About how to call and deploy it. I believe that you can do.

 



]]>
Custom queries in Liferay(custom-sql)http://www.tkk7.com/Noah/articles/362176.html鐪奸暅铔?/dc:creator>鐪奸暅铔?/author>Thu, 27 Oct 2011 09:44:00 GMThttp://www.tkk7.com/Noah/articles/362176.htmlhttp://www.tkk7.com/Noah/comments/362176.htmlhttp://www.tkk7.com/Noah/articles/362176.html#Feedback0http://www.tkk7.com/Noah/comments/commentRss/362176.htmlhttp://www.tkk7.com/Noah/services/trackbacks/362176.html闃呰鍏ㄦ枃

]]>
Liferay涓儴鍒嗛厤緗枃浠?Portal.properties)鐨勭浉鍏寵鏄?/title><link>http://www.tkk7.com/Noah/articles/286450.html</link><dc:creator>鐪奸暅铔?/dc:creator><author>鐪奸暅铔?/author><pubDate>Sun, 12 Jul 2009 05:19:00 GMT</pubDate><guid>http://www.tkk7.com/Noah/articles/286450.html</guid><wfw:comment>http://www.tkk7.com/Noah/comments/286450.html</wfw:comment><comments>http://www.tkk7.com/Noah/articles/286450.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Noah/comments/commentRss/286450.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Noah/services/trackbacks/286450.html</trackback:ping><description><![CDATA[<p> </p> <p>涓鍙ヨ瘽涔熶笉鐢ㄥ璇達(dá)紒</p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="color: #008080"> 1</span><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #000000">#璁劇疆鍥劇墖搴撲腑錛屼笂浼犲浘鐗囩殑澶у皬錛屽崟浣嶆槸Bit <br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />ig.image.max.size</span><span style="color: #000000">=</span><span style="color: #000000">10240000</span><span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#鍏佽鍥劇墖涓婁紶鐨勭被鍨?br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />ig.image.extensions</span><span style="color: #000000">=</span><span style="color: #000000">.bmp</span><span style="color: #000000">,</span><span style="color: #000000">.gif</span><span style="color: #000000">,</span><span style="color: #000000">.jpeg</span><span style="color: #000000">,</span><span style="color: #000000">.jpg</span><span style="color: #000000">,</span><span style="color: #000000">.png</span><span style="color: #000000">,</span><span style="color: #000000">.tif</span><span style="color: #000000">,</span><span style="color: #000000">.tiff<br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆鏂囨。搴撲腑錛屼笂浼犳枃浠剁殑澶у皬錛屽崟浣嶆槸Bit<br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />dl.file.max.size</span><span style="color: #000000">=</span><span style="color: #000000">3072000</span><span style="color: #000000"><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#鍏佽鏂囨。涓婁紶鐨勭被鍨?br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />dl.file.extensions</span><span style="color: #000000">=</span><span style="color: #000000">.bmp</span><span style="color: #000000">,</span><span style="color: #000000">.css</span><span style="color: #000000">,</span><span style="color: #000000">.doc</span><span style="color: #000000">,</span><span style="color: #000000">.dot</span><span style="color: #000000">,</span><span style="color: #000000">.gif</span><span style="color: #000000">,</span><span style="color: #000000">.gz</span><span style="color: #000000">,</span><span style="color: #000000">.htm</span><span style="color: #000000">,</span><span style="color: #000000">.html</span><span style="color: #000000">,</span><span style="color: #000000">.jpg</span><span style="color: #000000">,</span><span style="color: #000000">.js</span><span style="color: #000000">,</span><span style="color: #000000">.odb</span><span style="color: #000000">,</span><span style="color: #000000">.odf</span><span style="color: #000000">,</span><span style="color: #000000">.odg</span><span style="color: #000000">,</span><span style="color: #000000">.odp</span><span style="color: #000000">,</span><span style="color: #000000">.ods</span><span style="color: #000000">,</span><span style="color: #000000">.odt</span><span style="color: #000000">,</span><span style="color: #000000">.pdf</span><span style="color: #000000">,</span><span style="color: #000000">.png</span><span style="color: #000000">,</span><span style="color: #000000">.ppt</span><span style="color: #000000">,</span><span style="color: #000000">.rtf</span><span style="color: #000000">,</span><span style="color: #000000">.swf</span><span style="color: #000000">,</span><span style="color: #000000">.sxc</span><span style="color: #000000">,</span><span style="color: #000000">.sxi</span><span style="color: #000000">,</span><span style="color: #000000">.sxw</span><span style="color: #000000">,</span><span style="color: #000000">.tar</span><span style="color: #000000">,</span><span style="color: #000000">.tiff</span><span style="color: #000000">,</span><span style="color: #000000">.tgz</span><span style="color: #000000">,</span><span style="color: #000000">.txt</span><span style="color: #000000">,</span><span style="color: #000000">.vsd</span><span style="color: #000000">,</span><span style="color: #000000">.xls</span><span style="color: #000000">,</span><span style="color: #000000">.xml</span><span style="color: #000000">,</span><span style="color: #000000">.zip<br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#鐧誨綍鐩稿叧錛堣繖涓彲浠ュ湪浼佷笟綆$悊閲岃緗級<br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />company.security.auth.type</span><span style="color: #000000">=</span><span style="color: #000000">screenName<br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />company.security.auto.login</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />company.security.send.password</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />company.security.strangers</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />open.id.auth.enabled</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#鏄惁鍑虹幇鐢ㄦ埛棣栨鐧婚檰鐨勫崗璁〉闈?br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />terms.of.use.required</span><span style="color: #000000">=</span><span style="color: #000000">true<br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /> <br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#榛樿鐢ㄦ埛甯冨眬<br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#鍙互鑷繁璁劇疆涓婇潰瑕佹斁鐨凱ortlet銆?br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />default.user.layout.name</span><span style="color: #000000">=</span><span style="color: #000000">Home<br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />default.user.layout.template.id</span><span style="color: #000000">=</span><span style="color: #000000">3_columns<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />default.user.layout.column-</span><span style="color: #000000">1</span><span style="color: #000000">=</span><span style="color: #000000"><br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />default.user.layout.column-</span><span style="color: #000000">2</span><span style="color: #000000">=</span><span style="color: #000000"><br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />default.user.layout.column-</span><span style="color: #000000">3</span><span style="color: #000000">=</span><span style="color: #000000"><br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />default.user.layout.column-</span><span style="color: #000000">4</span><span style="color: #000000">=</span><span style="color: #000000"><br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆榛樿鐨勭敤鎴鋒ā鏉?br /> </span><span style="color: #008080">32</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />layout.default.template.id</span><span style="color: #000000">=</span><span style="color: #000000">2_columns_ii<br /> </span><span style="color: #008080">33</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /> <br /> </span><span style="color: #008080">34</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#Session鎺у埗<br /> </span><span style="color: #008080">35</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />session.timeout</span><span style="color: #000000">=</span><span style="color: #000000">30</span><span style="color: #000000"><br /> </span><span style="color: #008080">36</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />session.timeout.warning</span><span style="color: #000000">=</span><span style="color: #000000">1</span><span style="color: #000000"><br /> </span><span style="color: #008080">37</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />session.timeout.auto.extend</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">38</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /> <br /> </span><span style="color: #008080">39</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#闅愯棌娌℃潈闄愮殑Portlet<br /> </span><span style="color: #008080">40</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />layout.show.portlet.access.denied</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">41</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#闅愯棌涓嶆椿鍔ㄧ殑Portlet<br /> </span><span style="color: #008080">42</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />layout.show.portlet.inactive</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">43</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆鐢ㄦ埛鏄惁鍙互澧炲姞Portlet<br /> </span><span style="color: #008080">44</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />layout.add.portlets</span><span style="color: #000000">=</span><span style="color: #000000">true<br /> </span><span style="color: #008080">45</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆鏄惁鏄劇ず鏈澶у寲鍥炬爣<br /> </span><span style="color: #008080">46</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />layout.guest.show.max.icon</span><span style="color: #000000">=</span><span style="color: #000000">true<br /> </span><span style="color: #008080">47</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆鏄惁鏄劇ず鏈灝忓寲鍥炬爣<br /> </span><span style="color: #008080">48</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />layout.guest.show.min.icon</span><span style="color: #000000">=</span><span style="color: #000000">false<br /> </span><span style="color: #008080">49</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">50</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#鏉冮檺璁劇疆鐨勮鍙栬礬寰?br /> </span><span style="color: #008080">51</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />resource.actions.configs</span><span style="color: #000000">=</span><span style="color: #000000">resource-actions/default.xml<br /> </span><span style="color: #008080">52</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">53</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆榛樿鐨勭敤鎴峰ご鍍?br /> </span><span style="color: #008080">54</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />image.default.user.female.portrait</span><span style="color: #000000">=</span><span style="color: #000000">com/liferay/portal/dependencies/user_female_portrait.gif<br /> </span><span style="color: #008080">55</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />image.default.user.male.portrait</span><span style="color: #000000">=</span><span style="color: #000000">com/liferay/portal/dependencies/user_male_portrait.gif<br /> </span><span style="color: #008080">56</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">57</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆榛樿鐨凩ogo<br /> </span><span style="color: #008080">58</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />image.default.company.logo</span><span style="color: #000000">=</span><span style="color: #000000">com/liferay/portal/dependencies/company_logo.png<br /> </span><span style="color: #008080">59</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">60</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆璁よ瘉鐧婚檰鐨勯〉闈?br /> </span><span style="color: #008080">61</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />auth.login.url</span><span style="color: #000000">=</span><span style="color: #000000">/web/</span><span style="color: #000000">12702</span><span style="color: #000000">/</span><span style="color: #000000">1</span><span style="color: #000000"><br /> </span><span style="color: #008080">62</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆鐧誨嚭鍚庣殑欏甸潰璺緞<br /> </span><span style="color: #008080">63</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />default.logout.page.path</span><span style="color: #000000">=</span><span style="color: #000000">/web/</span><span style="color: #000000">12702</span><span style="color: #000000"><br /> </span><span style="color: #008080">64</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /><br /> </span><span style="color: #008080">65</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />#璁劇疆榛樿鐨勭敤鎴瘋鑹?br /> </span><span style="color: #008080">66</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />admin.default.role.names</span><span style="color: #000000">=</span><span style="color: #000000">Power User\nUser<br /> </span><span style="color: #008080">67</span><span style="color: #000000"><img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" /></span></div> <img src ="http://www.tkk7.com/Noah/aggbug/286450.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Noah/" target="_blank">鐪奸暅铔?/a> 2009-07-12 13:19 <a href="http://www.tkk7.com/Noah/articles/286450.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>CAS鍗曠偣鐧婚檰,涓枃鐢ㄦ埛鍚嶆棤娉曢獙璇佽В鍐蟲柟妗?/title><link>http://www.tkk7.com/Noah/articles/286449.html</link><dc:creator>鐪奸暅铔?/dc:creator><author>鐪奸暅铔?/author><pubDate>Sun, 12 Jul 2009 05:02:00 GMT</pubDate><guid>http://www.tkk7.com/Noah/articles/286449.html</guid><wfw:comment>http://www.tkk7.com/Noah/comments/286449.html</wfw:comment><comments>http://www.tkk7.com/Noah/articles/286449.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/Noah/comments/commentRss/286449.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Noah/services/trackbacks/286449.html</trackback:ping><description><![CDATA[<p>鐧婚檰鍚嶅鏋滅敤涓枃鐨勮瘽錛屼細(xì)鍑虹幇涔辯爜錛屽鑷存棤娉曢獙璇侀氳繃銆傝В鍐充腑鏂囬棶棰樻棤闈炲氨鏄紪鐮侀棶棰橈紝鍏朵腑闇瑕佽漿鎹㈢紪鐮佺殑鏈変互涓嬪嚑涓湴鏂癸紟</p> <p>絎竴錛屽湪Web.xml鏂囦歡閲屽姞涓奆ilter錛屽鎵鏈夐〉闈㈣繘琛屼竴嬈$紪鐮佽漿鎹紟</p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="color: #008080"> 1</span><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /><span style="color: #0000ff"><</span><span style="color: #800000">filter</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"><</span><span style="color: #800000">description</span><span style="color: #0000ff">></span><span style="color: #000000">EncodingFilter</span><span style="color: #0000ff"></</span><span style="color: #800000">description</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"><</span><span style="color: #800000">filter-name</span><span style="color: #0000ff">></span><span style="color: #000000">EncodingFilter</span><span style="color: #0000ff"></</span><span style="color: #800000">filter-name</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"><</span><span style="color: #800000">filter-class</span><span style="color: #0000ff">></span><span style="color: #000000">com.xyb.EncodingFilter</span><span style="color: #0000ff"></</span><span style="color: #800000">filter-class</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"><</span><span style="color: #800000">init-param</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />            </span><span style="color: #0000ff"><</span><span style="color: #800000">description</span><span style="color: #0000ff">></span><span style="color: #000000">encoding_charset</span><span style="color: #0000ff"></</span><span style="color: #800000">description</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />            </span><span style="color: #0000ff"><</span><span style="color: #800000">param-name</span><span style="color: #0000ff">></span><span style="color: #000000">encoding</span><span style="color: #0000ff"></</span><span style="color: #800000">param-name</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />            </span><span style="color: #0000ff"><</span><span style="color: #800000">param-value</span><span style="color: #0000ff">>gb2312</span><span style="color: #0000ff"></</span><span style="color: #800000">param-value</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"></</span><span style="color: #800000">init-param</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"><</span><span style="color: #800000">init-param</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />            </span><span style="color: #0000ff"><</span><span style="color: #800000">param-name</span><span style="color: #0000ff">></span><span style="color: #000000">ignore</span><span style="color: #0000ff"></</span><span style="color: #800000">param-name</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />            </span><span style="color: #0000ff"><</span><span style="color: #800000">param-value</span><span style="color: #0000ff">></span><span style="color: #000000">true</span><span style="color: #0000ff"></</span><span style="color: #800000">param-value</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">13</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"></</span><span style="color: #800000">init-param</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff"></</span><span style="color: #800000">filter</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff"><</span><span style="color: #800000">filter-mapping</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"><</span><span style="color: #800000">filter-name</span><span style="color: #0000ff">></span><span style="color: #000000">EncodingFilter</span><span style="color: #0000ff"></</span><span style="color: #800000">filter-name</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" />        </span><span style="color: #0000ff"><</span><span style="color: #800000">url-pattern</span><span style="color: #0000ff">></span><span style="color: #000000">/*</span><span style="color: #0000ff"></</span><span style="color: #800000">url-pattern</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff"></</span><span style="color: #800000">filter-mapping</span><span style="color: #0000ff">></span></div> <p>涓嬮潰鏄疎ncodingFilter綾伙細(xì)</p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="color: #008080"> 1</span><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /><span style="color: #0000ff">package</span><span style="color: #000000"> com.xyb;<br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.io.IOException;<br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> javax.servlet.Filter;<br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> javax.servlet.FilterChain;<br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> javax.servlet.FilterConfig;<br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> javax.servlet.ServletException;<br /> </span><span style="color: #008080"> 9</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> javax.servlet.ServletRequest;<br /> </span><span style="color: #008080">10</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> javax.servlet.ServletResponse;<br /> </span><span style="color: #008080">11</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /><br /> </span><span style="color: #008080">12</span><span style="color: #000000"><img id="Codehighlighter1_260_288_Open_Image" onclick="this.style.display='none'; Codehighlighter1_260_288_Open_Text.style.display='none'; Codehighlighter1_260_288_Closed_Image.style.display='inline'; Codehighlighter1_260_288_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" /><img style="display: none" id="Codehighlighter1_260_288_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_260_288_Closed_Text.style.display='none'; Codehighlighter1_260_288_Open_Image.style.display='inline'; Codehighlighter1_260_288_Open_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" /></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_260_288_Closed_Text">/** */</span><span id="Codehighlighter1_260_288_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">13</span><span style="color: #008000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />*<br /> </span><span style="color: #008080">14</span><span style="color: #008000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />* </span><span style="color: #808080">@author</span><span style="color: #008000"> XiangYabin<br /> </span><span style="color: #008080">15</span><span style="color: #008000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" /></span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img id="Codehighlighter1_336_1811_Open_Image" onclick="this.style.display='none'; Codehighlighter1_336_1811_Open_Text.style.display='none'; Codehighlighter1_336_1811_Closed_Image.style.display='inline'; Codehighlighter1_336_1811_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" /><img style="display: none" id="Codehighlighter1_336_1811_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_336_1811_Closed_Text.style.display='none'; Codehighlighter1_336_1811_Open_Image.style.display='inline'; Codehighlighter1_336_1811_Open_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> EncodingFilter </span><span style="color: #0000ff">implements</span><span style="color: #000000"> Filter </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_336_1811_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_336_1811_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">protected</span><span style="color: #000000"> String encoding </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">protected</span><span style="color: #000000"> FilterConfig filterConfig </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">protected</span><span style="color: #000000"> </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> ignore </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img id="Codehighlighter1_497_585_Open_Image" onclick="this.style.display='none'; Codehighlighter1_497_585_Open_Text.style.display='none'; Codehighlighter1_497_585_Closed_Image.style.display='inline'; Codehighlighter1_497_585_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_497_585_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_497_585_Closed_Text.style.display='none'; Codehighlighter1_497_585_Open_Image.style.display='inline'; Codehighlighter1_497_585_Open_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> destroy() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_497_585_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_497_585_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">23</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">24</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.encoding </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.filterConfig </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> doFilter(ServletRequest request, ServletResponse response,<br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            FilterChain chain)<br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img id="Codehighlighter1_747_1139_Open_Image" onclick="this.style.display='none'; Codehighlighter1_747_1139_Open_Text.style.display='none'; Codehighlighter1_747_1139_Closed_Image.style.display='inline'; Codehighlighter1_747_1139_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_747_1139_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_747_1139_Closed_Text.style.display='none'; Codehighlighter1_747_1139_Open_Image.style.display='inline'; Codehighlighter1_747_1139_Open_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" />            </span><span style="color: #0000ff">throws</span><span style="color: #000000"> IOException, ServletException </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_747_1139_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_747_1139_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">32</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #008000">//</span><span style="color: #008000"> Conditionally select and set the character encoding to be used</span><span style="color: #008000"><br /> </span><span style="color: #008080">33</span><span style="color: #008000"><img id="Codehighlighter1_879_1034_Open_Image" onclick="this.style.display='none'; Codehighlighter1_879_1034_Open_Text.style.display='none'; Codehighlighter1_879_1034_Closed_Image.style.display='inline'; Codehighlighter1_879_1034_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_879_1034_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_879_1034_Closed_Text.style.display='none'; Codehighlighter1_879_1034_Open_Image.style.display='inline'; Codehighlighter1_879_1034_Open_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" /></span><span style="color: #000000">        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (ignore </span><span style="color: #000000">||</span><span style="color: #000000"> (request.getCharacterEncoding() </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_879_1034_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_879_1034_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">34</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            String encoding </span><span style="color: #000000">=</span><span style="color: #000000"> selectEncoding(request);<br /> </span><span style="color: #008080">35</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #0000ff">if</span><span style="color: #000000"> (encoding </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> </span><span style="color: #008080">36</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                request.setCharacterEncoding(encoding);<br /> </span><span style="color: #008080">37</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />        }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">38</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">39</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #008000">//</span><span style="color: #008000"> Pass control on to the next filter</span><span style="color: #008000"><br /> </span><span style="color: #008080">40</span><span style="color: #008000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: #000000">        chain.doFilter(request, response);<br /> </span><span style="color: #008080">41</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">42</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">43</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /> </span><span style="color: #008080">44</span><span style="color: #000000"><img id="Codehighlighter1_1218_1681_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1218_1681_Open_Text.style.display='none'; Codehighlighter1_1218_1681_Closed_Image.style.display='inline'; Codehighlighter1_1218_1681_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_1218_1681_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1218_1681_Closed_Text.style.display='none'; Codehighlighter1_1218_1681_Open_Image.style.display='inline'; Codehighlighter1_1218_1681_Open_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> init(FilterConfig filterConfig) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> ServletException </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1218_1681_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1218_1681_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">45</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">46</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.filterConfig </span><span style="color: #000000">=</span><span style="color: #000000"> filterConfig;<br /> </span><span style="color: #008080">47</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.encoding </span><span style="color: #000000">=</span><span style="color: #000000"> filterConfig.getInitParameter(</span><span style="color: #000000">"</span><span style="color: #000000">encoding</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">48</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        String value </span><span style="color: #000000">=</span><span style="color: #000000"> filterConfig.getInitParameter(</span><span style="color: #000000">"</span><span style="color: #000000">ignore</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">49</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (value </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> </span><span style="color: #008080">50</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #0000ff">this</span><span style="color: #000000">.ignore </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">51</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">else</span><span style="color: #000000"> </span><span style="color: #0000ff">if</span><span style="color: #000000"> (value.equalsIgnoreCase(</span><span style="color: #000000">"</span><span style="color: #000000">true</span><span style="color: #000000">"</span><span style="color: #000000">))<br /> </span><span style="color: #008080">52</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #0000ff">this</span><span style="color: #000000">.ignore </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">53</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">else</span><span style="color: #000000"> </span><span style="color: #0000ff">if</span><span style="color: #000000"> (value.equalsIgnoreCase(</span><span style="color: #000000">"</span><span style="color: #000000">yes</span><span style="color: #000000">"</span><span style="color: #000000">))<br /> </span><span style="color: #008080">54</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #0000ff">this</span><span style="color: #000000">.ignore </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">55</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">else</span><span style="color: #000000"><br /> </span><span style="color: #008080">56</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: #0000ff">this</span><span style="color: #000000">.ignore </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">;<br /> </span><span style="color: #008080">57</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">58</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">59</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /> </span><span style="color: #008080">60</span><span style="color: #000000"><img id="Codehighlighter1_1748_1804_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1748_1804_Open_Text.style.display='none'; Codehighlighter1_1748_1804_Closed_Image.style.display='inline'; Codehighlighter1_1748_1804_Closed_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img style="display: none" id="Codehighlighter1_1748_1804_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1748_1804_Closed_Text.style.display='none'; Codehighlighter1_1748_1804_Open_Image.style.display='inline'; Codehighlighter1_1748_1804_Open_Text.style.display='inline';" alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" />    </span><span style="color: #0000ff">protected</span><span style="color: #000000"> String selectEncoding(ServletRequest request) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1748_1804_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1748_1804_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">61</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">62</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> (</span><span style="color: #0000ff">this</span><span style="color: #000000">.encoding);<br /> </span><span style="color: #008080">63</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /> </span><span style="color: #008080">64</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">65</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /> </span><span style="color: #008080">66</span><span style="color: #000000"><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span></div> <p>絎簩姝ワ紝淇敼CAS鐧婚檰楠岃瘉欏甸潰鐨勭紪鐮侊紝濡傛灉浣犳病鎹㈣繃榪欎釜涓婚鐨勮瘽錛岄粯璁ょ殑鏄慨鏀筗EB-INF\view\jsp\default\ui\casLoginView.jsp鏂囦歡錛屽湪鏈涓婇潰鍔犱笂<%@ page pageEncoding="gb2312"%>銆傝繖閲岃鐗瑰埆娉ㄦ剰涓涓嬶紝榪欎釜欏甸潰鐨勭紪鐮佽鍜屼笂闈ML鏂囦歡閲屽啓鐨勭紪鐮佷竴鑷淬?/p> <p>絎笁姝ワ紝淇敼楠岃瘉鎴愬姛鍚庡仛璺寵漿鐨勯〉闈€備篃灝辨槸WEB-INF\view\jsp\protocol\2.0\casServiceValidationSuccess.jsp鏂囦歡錛屽湪鏈涓婇潰鍔犱笂<%@ page pageEncoding="UTF-8"%>銆傝繖閲岀壒鍒敞鎰忕殑鏄繖涓〉闈㈢殑緙栫爜瑕佸拰浣犺煩杞繃鍘葷殑閭d釜欏甸潰鐨勭紪鐮佷竴鑷達(dá)紝鎹㈠彞璇濊錛屽鎴風(fēng)鐨勯獙璇侀〉闈㈢殑緙栫爜瑕佸拰榪欎釜鍦版柟鐨勪竴鑷達(dá)紝涓嶄竴鑷寸殑璇濓紝瑕佽漿鎹竴涓嬨?/p> <p>緇忚繃榪欎笁姝ヤ箣鍚庯紝鐞嗚涓婅灝卞凡緇忓彲浠ラ獙璇侀氳繃浜嗐?/p> <img src ="http://www.tkk7.com/Noah/aggbug/286449.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Noah/" target="_blank">鐪奸暅铔?/a> 2009-07-12 13:02 <a href="http://www.tkk7.com/Noah/articles/286449.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Liferay涓悳绱㈠姛鑳藉寮?/title><link>http://www.tkk7.com/Noah/articles/277787.html</link><dc:creator>鐪奸暅铔?/dc:creator><author>鐪奸暅铔?/author><pubDate>Mon, 25 May 2009 02:31:00 GMT</pubDate><guid>http://www.tkk7.com/Noah/articles/277787.html</guid><wfw:comment>http://www.tkk7.com/Noah/comments/277787.html</wfw:comment><comments>http://www.tkk7.com/Noah/articles/277787.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Noah/comments/commentRss/277787.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Noah/services/trackbacks/277787.html</trackback:ping><description><![CDATA[<p>榛樿鎯呭喌涓嬶紝Liferay涓嚜甯︾殑閭d釜鎼滅儲鏉★紝灝辨槸鍦ㄥ彸涓婅鐨勯偅涓紝鍙兘鎼滅儲JournalContent鐨勫唴瀹廣傚叾瀹烇紝鎴戜滑鏈鎯蟲悳绱㈢殑鏄疛ournalArticle涓殑鍐呭銆傛墍浠ュ彲浠ユ妸榪欎釜鍔熻兘鏀硅繘涓涓嬨備慨鏀規(guī)柟娉曞緢綆鍗曘?/p> <p>鎵撳紑婧愪唬鐮佹枃浠秛til-taglib/src/com/liferay/taglib/util/VelocityTaglib.java<br /> 鎵懼埌journalContentSearch()鏂規(guī)硶錛屽啀鍚庨潰澧炲姞涓涓柟娉曪細(xì)<br /> public String journalArticleSearch() throws Exception {<br />   _res.recycle();</p> <p>  SearchTag.doTag(_ctx, _req, _res);</p> <p>  return _res.getString();<br />  }<br /> 閲嶆柊鎴愮敓util-taglib.Jar鍖呫傚彂甯冨埌鏈嶅姟鍣ㄣ?/p> <p>鐒跺悗錛屼慨鏀逛富棰樺寘涓師鏉ョ殑$theme.journalContentSearch()涓?theme.journalArticleSearch()錛屽嵆鍙?/p> <img src ="http://www.tkk7.com/Noah/aggbug/277787.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Noah/" target="_blank">鐪奸暅铔?/a> 2009-05-25 10:31 <a href="http://www.tkk7.com/Noah/articles/277787.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Liferay涓嬌鐢–AS瀹炵幇鍗曠偣鐧婚檰(SSO)http://www.tkk7.com/Noah/articles/256018.html鐪奸暅铔?/dc:creator>鐪奸暅铔?/author>Sun, 22 Feb 2009 04:53:00 GMThttp://www.tkk7.com/Noah/articles/256018.htmlhttp://www.tkk7.com/Noah/comments/256018.htmlhttp://www.tkk7.com/Noah/articles/256018.html#Feedback3http://www.tkk7.com/Noah/comments/commentRss/256018.htmlhttp://www.tkk7.com/Noah/services/trackbacks/256018.html鍗曠偣鐧婚檰(SSO)鐨勫疄鐜版柟寮忔湁寰堝縐嶏紝榪欓噷鎵璇寸殑鏄敤CAS瀹炵幇錛岃繖涔熸槸Liferay涓墍閲囩撼鐨勬柟寮忋傝嚦浜庝粈涔堟槸CAS錛屽崟鐐圭櫥闄嗗疄鐜扮殑鍘熺悊絳夛紝榪欓噷涓嶅仛瑙i噴錛岀洿鎺ヤ竴姝ヤ竴姝ユ槑璇村疄鐜版柟寮忥紝濂戒簡錛屽涓涓瓧鐨勮垂璇濅篃涓嶈浜嗐?/p>

絎竴姝ワ紝鍒涘緩璇佷功

keytool -genkey -alias tomcat -keystore c:\mykeystore  -dname "CN=xyb, OU=localhost, O=localhost, L=SH, ST=SH, C=CN" -keypass 123456 -storepass 123456

PS:

 -genkey         鍒涘緩涓涓瘉涔?br /> -alias          璇佷功鐨勫埆鍚?br /> -keystore       鎸囧畾鐢熸垚姝よ瘉涔︾殑璺緞(鍙笉鍐欙紝榛樿瀛樺湪緋葷粺鐨凥ome鐩綍涓?keystore鏂囦歡涓?br /> -storepass      鎸囧畾瀵嗛挜搴撶殑瀵嗙爜
-keypass        鎸囧畾鍒悕鏉$洰鐨勫瘑鐮?br /> -dname          鎸囧畾璇佷功鎷ユ湁鑰呬俊鎭?鍙笉鍐欙紝浣嗭紝緋葷粺浼?xì)鎻惤C轟綘渚濇杈撳叆榪欎簺淇℃伅錛岀壒鍒娉ㄦ剰“CN”鐨勫兼槸浣犳兂鍋氫負(fù)CAS鏈嶅姟鍣ㄧ殑榪欏彴鏈哄櫒鐨勫煙鍚嶆垨鏈哄櫒鍚嶏紝浣嗗氨鏄笉鑳芥槸IP)
-keyalg         鎸囧畾瀵嗛挜鐨勭畻娉?鍙笉鍐?   
-validity       鎸囧畾鍒涘緩鐨勮瘉涔︽湁鏁堟湡澶氬皯澶?鍙笉鍐欙紝榛樿涓?0澶?

絎簩姝ワ紝瀵煎嚭璇佷功

keytool -export -alias tomcat -keystore c:\mykeystore -file c:\mycerts.cer -storepass 123456

PS:

-export         灝嗗埆鍚嶆寚瀹氱殑璇佷功瀵煎嚭鍒版枃浠?br /> -keystore       鎸囧畾鐢熸垚姝よ瘉涔︾殑璺緞(涓婁竴姝ヤ腑鍐欑殑浠涔堣繖灝卞啓浠涔堬紝濡傛灉娌″啓錛岃繖涔熶笉鍐?
 -file           鎸囧畾瀵煎嚭鍒版枃浠剁殑鏂囦歡鍚?/p>

絎笁姝ワ紝鎶婂鍑虹殑璇佷功瀵煎叆鍒板鎴風(fēng)鏈嶅姟鍣?/p>

keytool -import -trustcacerts -alias tomcat -keystore "%JAVA_HOME%/JRE/LIB/SECURITY/CACERTS" -storepass 123456 -file c:\mycerts.cer

PS:

-import         灝嗗凡絳懼悕鏁板瓧璇佷功瀵煎叆瀵嗛挜搴?br /> -file           鎸囧畾瑕佸鍏ュ埌瀵嗛挜搴撶殑鏂囦歡鍚?涔熷氨鏄笂涓姝ュ鍑虹殑閭d釜鏂囦歡)
鏈変竴涓彁紺猴細(xì)鏄惁淇′換榪欎釜璇佷功錛岃緭鍏?Y錛屽洖杞︺?/p>

絎洓姝ワ紝涓嬭澆cas闆嗘垚鍖呫傚皢涓嬭澆鍚庣殑鏂囦歡鏀瑰悕涓篶as-web錛屾斁緗湪liferay鐨剋ebapps鐩綍涓嬶紝鍦╟onf/server.xml涓壘鍒頒笅闈㈣繖孌碉紝鍘繪帀鍘熸湁鐨勬敞閲婂茍淇敼涓猴細(xì)

<Connector port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" URIEncoding="UTF-8"  keystorePass="123456" keyAlias="tomcat"/>

絎簲姝ワ紝鍦↙iferay鐨剋ebapps\ROOT\WEB-INF\classes\portal-ext.properties涓嬫坊鍔犲涓嬪唴瀹癸細(xì)

cas.auth.enabled=true
cas.login.url=https://xyb:8443/cas-web/login
cas.logout.url=https://xyb:8443/cas-web/logout
cas.server.name=瀹㈡埛绔疘P:8080
cas.service.url=
#cas.service.url=http://localhost:8080/c/portal/login
cas.validate.url=https://xyb:8443/cas-web/proxyValidate

濡傛灉娌″湪Liferay涓嬶紝鍙槸鏅氱殑Web紼嬪簭鍙敤Filter鏉ュ疄鐜幫紝鎵撳紑Web-INF\Web.XML鏂囦歡錛屽鍔犲涓嬩唬鐮?/p>

<filter>
        
<filter-name>CASFilter</filter-name>
        
<filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
        
<init-param>
            
<param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
            
<param-value>https://xyb:8443/cas-web/login</param-value>
        
</init-param><!--榪欓噷鐨剎yb鏄疌AS鏈嶅姟绔殑IP鎴栨満鍣ㄥ悕-->
        
<init-param>
            
<param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
            
<param-value>https://xyb:8443/cas-web/proxyValidate</param-value>
        
</init-param>
        
<init-param>
          
<param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
          
<param-value>localhost:8080</param-value><!--client:port灝辨槸闇瑕丆AS闇瑕佹嫤鎴殑鍦板潃鍜岀鍙o紝涓鑸氨鏄繖涓猅OMCAT鎵鍚姩鐨処P鍜宲ort-->
        
</init-param>
    
</filter>
    
    
<filter-mapping>
        
<filter-name>CASFilter</filter-name>
        
<url-pattern>/*</url-pattern><!--榪欓噷灝辨槸浣犺鎷︽埅鐨刄RL璇鋒眰-->
    
</filter-mapping>

 

鏈鍚庝竴姝ワ紝鍦ㄥ鎴風(fēng)鑾峰彇CAS璁よ瘉閫氳繃鐨勭敤鎴峰悕錛屽茍淇敼韜喚楠岃瘉紼嬪簭涓哄彧閫氳繃鐢ㄦ埛鍚嶆潵楠岃瘉銆傚鏄湪Liferay涓嬪氨涓嶇敤鍋氳繖涓姝ヤ簡錛孡iferay涓湰韜殑楠岃瘉鏄疭creenName瀛楁

1銆佸湪JSP鎴朣ervlet涓殑鐢ㄦ硶錛?/p>

<%@ page import="edu.yale.its.tp.cas.client.filter.CASFilter" %>
<%@ page import="javax.servlet.http.HttpServletRequest" %>
<%@ page import="javax.servlet.http.HttpSession" %>
<%
HttpSession ses 
= request.getSession();

String screenName 
=
(String)ses.getAttribute(CASFilter.CAS_FILTER_USER);
System.out.println(
"screenName==:"+screenName);
%> 

2銆佸湪Java涓氳繃 Session 鑾峰彇鐧誨綍鐢ㄦ埛鍚?/p>

// 浠ヤ笅涓よ呴兘鍙互
session.getAttribute(CASFilter.CAS_FILTER_USER);
session.getAttribute(
"edu.yale.its.tp.cas.client.filter.user");

3銆佸湪 JSTL 涓幏鍙栫敤鎴峰悕鐨勬柟娉?/p>

<c:out value="${sessionScope[CAS:'edu.yale.its.tp.cas.client.filter.user']}"/>


闂姹囨伙細(xì)

 涓ラ噸: edu.yale.its.tp.cas.client.CASAuthenticationException: Unable to validate ProxyTicketValidator [[edu.yale.its.tp.cas.client.ProxyTicketValidator prox
yList=[null] [edu.yale.its.tp.cas.client.ServiceTicketValidator casValidateUrl=[https://192.168.1.111:8443/cas/proxyValidate] ticket=[ST-0-9h7Mx5HK3pfsdxRv
MD3y] service=[http%3A%2F%2F192.168.1.222%3A8080%2Fservlets-examples%2Fservlet%2FHelloWorldExample] renew=false]]]

榪欎釜CAS寮傚父鏄粠CAS Client閲岄潰鎶涘嚭錛屾槸褰撴垜浠笉浣跨敤璇佷功鐨凜N鍘昏闂煙鍚嶇殑鏃跺欙紙姣斿涓婃枃鏄敤IP璁塊棶鑰屼笖璇佷功鐨凜N鏄IP瀵瑰簲鐨勫煙鍚嶈岄潪璇P錛夛紝CASClient鏃犳硶淇′換錛屼篃灝辨槸鎴戜笂闈㈢壒鎰忔彁鍒扮殑閭d釜CN鐨勯棶棰樸傝鐗瑰埆娉ㄦ剰銆?/p>

榪樻湁涓縐嶆儏鍐靛氨鏄鎴風(fēng)璇佷功娌℃湁瀵煎叆,鍚屾牱涔熸姤榪欎釜閿欒,鏈緇堝彲浠ュ綊涓轟竴鍙ヨ瘽,鑲畾鏄瘉涔﹂獙璇佹病鏈夐氳繃鎵鑷?

 

INFO [org.jasig.cas.authentication.AuthenticationManager
Impl] - <AuthenticationHandler: cn.com.tiansky.cas.authenticationHandlers.UPAuthenticationHandler successfully authenticated the user which provided the followi
ng credentials: [username: test]>

灝辯閿欒錛屽彲鑳芥槸瀹㈡埛绔殑閭d釜閰嶇疆鏂囦歡閲屽啓鐨勪笉澶銆備篃灝辨槸涓婇潰璇寸殑絎簲姝ワ紝瑕佸娉ㄦ剰涓涓嬨?/p>

 

java.io.IOException: Cannot recover key
        at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14Socket
Factory.java:125)
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESo
cketFactory.java:88)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoi
nt.java:292)
        at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.j
ava:138)
        at org.apache.catalina.connector.Connector.initialize(Connector.java:101

榪欑閿欒錛屽彲鑳芥槸浣犵敓鎴愮殑璇佷功鏈夐棶棰橈紝濡傛灉keypass鍜宻torepass鐨勫瘑鐮佷笉涓鑷翠篃浼?xì)鎶姌q欎釜閿?涓嶇煡涓轟粈涔堥潪瑕佽鎴愪竴鏍風(fēng)殑)



]]>
主站蜘蛛池模板: 久久亚洲国产精品123区| 国产成人在线免费观看| 无码人妻久久一区二区三区免费丨| 成人免费黄色网址| 最近免费中文字幕视频高清在线看| 好爽好紧好大的免费视频国产| 亚洲国产精品无码久久青草 | 免免费国产AAAAA片| 日韩免费无码一区二区视频| 免费乱理伦在线播放| 亚洲人精品午夜射精日韩| 亚洲电影在线免费观看| 亚洲av日韩aⅴ无码色老头 | 免费一级特黄特色大片| 一个人免费视频在线观看www| 亚洲免费观看网站| 四虎永久在线精品免费观看地址| 亚洲色婷婷一区二区三区| 亚洲xxxx18| 男女一进一出抽搐免费视频| 国产免费不卡视频| 免费成人av电影| 亚洲图片一区二区| 亚洲av日韩av永久无码电影| 无码AV片在线观看免费| 午夜老司机免费视频| 久久久久亚洲精品成人网小说| 亚洲欧洲免费无码| 最近免费中文字幕MV在线视频3 | 久久久www成人免费毛片| 亚洲午夜av影院| 亚洲av成人综合网| 久久一区二区免费播放| 无码中文在线二区免费| 亚洲尤码不卡AV麻豆| 久久亚洲精品国产精品婷婷 | 久久www免费人成看国产片| 无码人妻一区二区三区免费| 亚洲处破女AV日韩精品| 国产精品国产亚洲区艳妇糸列短篇| 9277手机在线视频观看免费|