日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

Jetspeed2學習筆記(一)

 cecho 2007-03-25
1、 Jetspeed系統(tǒng)的配置文件在《JetSpeed2 home》\conf\Catalina\localhost下的jetspeed.xml文件中,此文件中定義了JAAS驗證的配置及數(shù)據(jù)庫連接模式(包括連接語句)

2、配置一個居于IFrame的應用:

 

1、  引入jar包:jetspeed-components-2.0.jar

jetspeed-rewriter-2.0.jar

jetspeed-web-content-2.0.jar

portals-bridges-velocity-1.0.jar

portals-gems-2.0.jar

注:可以使用demo應用的lib

 

2、  portal.xml文件中配置一個portlet

<portlet id="EchoIframe">

    <portlet-name>EchoIframe</portlet-name>

    <display-name>lixin IFrame Portlet</display-name>

    <description>Prototype of the IFRAME2 portlet</description>

    <portlet-class>org.apache.jetspeed.portlet.IFrameGenericPortlet</portlet-class>

    <expiration-cache>-1</expiration-cache>

    <supports>

      <mime-type>text/html</mime-type>

      <portlet-mode>VIEW</portlet-mode>

    </supports>

    <portlet-preferences>

      <preference>

        <name>SRC</name>

        <value>http://www.sohu.com</value>

      </preference>

      <!-- Don‘t specify a HEIGHT if you want a normal filled out layout

     because percentage values result in the content not to be displayed on IE6.

     Specific values are ok though.

-->

      <preference>

                            <name>HEIGHT</name>

                            <value>600</value>

                     </preference>

      <preference>

        <name>WIDTH</name>

        <value>100%</value>

      </preference>

      <preference>

        <name>MAX-HEIGHT</name>

        <value>800</value>

      </preference>

      <preference>

        <name>MAX-WIDTH</name>

        <value>100%</value>

      </preference>

      <preference>

        <name>SCROLLING</name>

        <value>AUTO</value>

      </preference>

    </portlet-preferences>

    <supported-locale>en</supported-locale>

    <supported-locale>zh</supported-locale>

    <portlet-info>

      <title>搜狐網(wǎng)</title>

      <short-title>搜狐網(wǎng)</short-title>

      <keywords>iframe,frame,frame2,iframe2</keywords>

    </portlet-info>

  </portlet>

 

3、  配置對應的.psml文件,如下:

<fragment id="sample-335577" type="layout" name="jetspeed-layouts::VelocityTwoColumns">

    <fragment id="sample-3355771" type="portlet" name="sample::EchoIframe">

      <property layout="TwoColumns" name="row" value="0" />

      <property layout="TwoColumns" name="column" value="0" />

    </fragment>

    <fragment id="sample-3355772" type="portlet" name="sample::EchoPortlet">

      <property layout="TwoColumns" name="row" value="0" />

      <property layout="TwoColumns" name="column" value="1" />

    </fragment>

  </fragment>

 

 

 

3、

jetspeed2登陸權限驗證完全居于JAAS,其配置文件是在jetspeed應用lib庫中的jetspeed-security-<version>.jar中的login.conf文件中定義的,如果想替換成自己的驗證模式,可以修改此配置文件,如下:

Jetspeed {

   org.apache.jetspeed.security.impl.DefaultLoginModule required;

};

請注意,自己加的login.conf配置文件可以放在WEB-INF/classes目錄下的任何位置,并且修改WEB-INF/assembly目錄下的security-providers.xml文件相應的login.conf文件的新位置。

4、

JAASsubject主要用來表示一個應用主體對象(用戶),此對象有一個或多個用來標識其身份的Principals,如名字(name principal)或者身份證號(SSN principal),principal是用來唯一標識此subject,以區(qū)別于其他的subject的。原文如下:

To authorize access to resources, applications first need to authenticate

the source of the request. The JAAS framework defines the term subject

to represent the source of a request. A subject may be any entity, such

as a person or a service. Once the subject is authenticated, a

javax.security.auth.Subject is populated with associated identities, or

Principals. A Subject may have many Principals. For example, a person may

have a name Principal ("John Doe") and a SSN Principal ("123-45-6789"),

which distinguish it from other subjects.

 

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多