使用Enterprise Manager Console登陸的時候,會有兩個選項:獨(dú)立啟動和登陸到Oracle Management
Server。前者可以讓我們執(zhí)行一些普通的管理工作,比如管理帳戶、數(shù)據(jù)庫對象等,只有后者才能為我們提供備份的功能。不過在登陸到oms之前,你必須
首先安裝oms服務(wù)。
啟動oracle universal installer,查看已安裝產(chǎn)品,展開oracle主目錄--oraHome92,如果沒有oracle9i management and integration,表示你尚未安裝。安裝方法是:
在oracle universal installer的可用產(chǎn)品列表中,選擇安裝oracle 9i management and integration?oracle management server即可。
安裝完成后,你需要配置一個管理資料庫,啟動:Configuration and Migration tools-Enterprise
Manager Configuration Assistant。在配置操作中選擇配置本地的oracle management
server-創(chuàng)建一個新的資料庫檔案-典型。系統(tǒng)將會創(chuàng)建一個名為oemrep的數(shù)據(jù)庫,保存管理信息,其中你需要指定sys和system帳號的密
碼。
安裝完成后,啟動manage server服務(wù),windows下你可以到后臺服務(wù)中直接啟動,它的名字是OracleOraHome92ManagementServer。同時請保證其他自動啟動的oracle服務(wù)也是啟動的。
然后可以用Enterprise Manaer Console登陸了,帳號sysman
密碼oem_temp。第一次登陸后系統(tǒng)會要求你輸入新的sysman密碼。如果在登陸的時候出現(xiàn)”身份證明不正確”的提示,請確認(rèn)你使用的登陸帳號是
sysman,如果帳號無誤卻始終出現(xiàn)該錯誤,請刪除剛才建立的資料庫,重新建一個。
如果你使用windows,備份數(shù)據(jù)之前,首先需要建立一個操作系統(tǒng)的用戶,專門用于oracle備份,比如建立用戶oracle_back,隸屬于Administrator組和ora_dba組。然后需要在本地策略中給該用戶賦一個批處理權(quán)限。方法是:
控制面板-管理工具-本地安全策略-本地策略-用戶權(quán)利指派-作為批處理作業(yè)登陸,在該權(quán)限下面增加剛才建立的oracle_back用戶。
回到Enterprise Manager
Console,打開配置?首選項?首選身份證明,在目標(biāo)名中找到你的機(jī)器名,同時它的目標(biāo)類型為節(jié)點(diǎn),在下面的身份證明中輸入oracle_back和
它的密碼。然后找到你要備份的數(shù)據(jù)庫名,它的目標(biāo)類型是數(shù)據(jù)庫,在身份證明中輸入dba帳號。Ok,現(xiàn)在你可以備份數(shù)據(jù)了。在任意一張表中點(diǎn)右鍵,選擇數(shù)
據(jù)管理?導(dǎo)出,你就可以在作業(yè)中看到這個任務(wù)。
<!--?Tomcat服務(wù)器配置示例文件?-->
<!--?Note?that?component?elements?are?nested?corresponding?to?their
?????parent-child?relationships?with?each?other?-->
<!--?注意,這些組件的構(gòu)成是根據(jù)相互之間的父子關(guān)系進(jìn)行嵌套的。-->
<!--?A?"Server"?is?a?singleton?element?that?represents?the?entire?JVM,
?????which?may?contain?one?or?more?"Service"?instances.?The?Server
?????listens?for?a?shutdown?command?on?the?indicated?port.
?????Note:?A?"Server"?is?not?itself?a?"Container",?so?you?may?not
?????define?subcomponents?such?as?"Valves"?or?"Loggers"?at?this?level.
?-->
<!--?一個“Server”是一個提供完整的JVM的獨(dú)立組件,它可以包含一個或多個
?????“Service”實例。服務(wù)器在指定的端口上監(jiān)聽shutdown命令。
?????
?????注意:一個“Server”自身不是一個“Container”(容器),因此在這里你
?????不可以定義諸如“Valves”或者“Loggers”子組件
-->
<Server?port="8005"?shutdown="SHUTDOWN"?debug="0">
??<!--?Comment?these?entries?out?to?disable?JMX?MBeans?support?-->
??<!--?這些指令組件關(guān)閉JMX?MBeans支持?-->
??
??<!--?You?may?also?configure?custom?components?(e.g.?Valves/Realms)?by?
???????including?your?own?mbean-descriptor?file(s),?and?setting?the?
???????"descriptors"?attribute?to?point?to?a?';'?seperated?list?of?paths
???????(in?the?ClassLoader?sense)?of?files?to?add?to?the?default?list.
???????e.g.?descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
??-->
??<!--?你也可以通過包含你自己的mbean描述文件配置自定義的組件,然后設(shè)置
???????“descriptors”屬性為以“;”為分隔的文件名列表嚴(yán)將它添加到默認(rèn)列表
???????中,例如:descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"。
?-->
???????
??<Listener?className="org.apache.catalina.mbeans.ServerLifecycleListener"
????????????debug="0"/>
??<Listener?className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
????????????debug="0"/>
??<!--?Global?JNDI?resources?-->
??<!--?全局JNDI資源?-->
??<GlobalNamingResources>
????<!--?Test?entry?for?demonstration?purposes?-->
????<!--?出于示例目的的測試入口?-->
????<Environment?name="simpleValue"?type="java.lang.Integer"?value="30"/>
????<!--?Editable?user?database?that?can?also?be?used?by
?????????UserDatabaseRealm?to?authenticate?users?-->
????<!--?可編輯的,用來通過UserDatabaseRealm認(rèn)證用戶的用戶數(shù)據(jù)庫?-->
????
????<Resource?name="UserDatabase"?auth="Container"
??????????????type="org.apache.catalina.UserDatabase"
???????description="User?database?that?can?be?updated?and?saved">
????</Resource>
????<ResourceParams?name="UserDatabase">
??????<parameter>
????????<name>factory</name>
????????<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
??????</parameter>
??????<parameter>
????????<name>pathname</name>
????????<value>conf/tomcat-users.xml</value>
??????</parameter>
????</ResourceParams>
??</GlobalNamingResources>
??<!--?A?"Service"?is?a?collection?of?one?or?more?"Connectors"?that?share
???????a?single?"Container"?(and?therefore?the?web?applications?visible
???????within?that?Container).?Normally,?that?Container?is?an?"Engine",
???????but?this?is?not?required.
???????Note:?A?"Service"?is?not?itself?a?"Container",?so?you?may?not
???????define?subcomponents?such?as?"Valves"?or?"Loggers"?at?this?level.
???-->
??<!--?一個“Service”是一個或多個共用一個單獨(dú)“Container”(容器)的“Connectors”
???????組合(因此,應(yīng)用程序在容器中可見)。通常,這個容器是一個“Engine”
???????(引擎),但這不是必須的。
???????
???????注意:一個“Service”自身不是一個容器,因此,在這個級別上你不可定義
???????諸如“Valves”或“Loggers”子組件。
??-->
??<!--?Define?the?Tomcat?Stand-Alone?Service?-->
??<!--?定義Tomcat的標(biāo)準(zhǔn)獨(dú)立服務(wù)?-->
??<Service?name="Catalina">
????<!--?A?"Connector"?represents?an?endpoint?by?which?requests?are?received
?????????and?responses?are?returned.?Each?Connector?passes?requests?on?to?the
?????????associated?"Container"?(normally?an?Engine)?for?processing.
?????????By?default,?a?non-SSL?HTTP/1.1?Connector?is?established?on?port?8080.
?????????You?can?also?enable?an?SSL?HTTP/1.1?Connector?on?port?8443?by
?????????following?the?instructions?below?and?uncommenting?the?second?Connector
?????????entry.?SSL?support?requires?the?following?steps?(see?the?SSL?Config
?????????HOWTO?in?the?Tomcat?5?documentation?bundle?for?more?detailed
?????????instructions):
?????????*?If?your?JDK?version?1.3?or?prior,?download?and?install?JSSE?1.0.2?or
???????????later,?and?put?the?JAR?files?into?"$JAVA_HOME/jre/lib/ext".
?????????*?Execute:
?????????????%JAVA_HOME%\bin\keytool?-genkey?-alias?tomcat?-keyalg?RSA?(Windows)
?????????????$JAVA_HOME/bin/keytool?-genkey?-alias?tomcat?-keyalg?RSA?(Unix)
???????????with?a?password?value?of?"changeit"?for?both?the?certificate?and
???????????the?keystore?itself.
?????????By?default,?DNS?lookups?are?enabled?when?a?web?application?calls
?????????request.getRemoteHost().?This?can?have?an?adverse?impact?on
?????????performance,?so?you?can?disable?it?by?setting?the
?????????"enableLookups"?attribute?to?"false".?When?DNS?lookups?are?disabled,
?????????request.getRemoteHost()?will?return?the?String?version?of?the
?????????IP?address?of?the?remote?client.
????-->
????<!--?一個“Connector”(連接器)代表一個請求被接收和應(yīng)答所需要的端點(diǎn)。每個連
?????????接器通過相關(guān)的“Container”(容器)處理請求。
?????????
?????????默認(rèn)情況下,一個非SSL的HTTP/1.1的連接器被綁定在端口8080。你也可以通過
?????????根據(jù)后面的使用說明并取消第二個連接器入口的注釋,在端口8443上建立一個
?????????SSL?HTTP/1.1的連接器。開放SSL支持需要下面幾步(參見Tomcat?5文檔中怎樣
?????????配置SSL的說明以取得更多的詳細(xì)信息):
?????????*?如果你的JDK是1.3或1.3以前的版本,下載安裝JSSE?1.0.2或以后版本,并放
???????????置JAR文件到“$JAVA_HOME/jre/lib/ext”目錄下。
?????????*?帶一個“changeit”的口令值執(zhí)行:
?????????????%JAVA_HOME%\bin\keytool?-genkey?-alias?tomcat?-keyalg?RSA?(Windows)
?????????????$JAVA_HOME/bin/keytool?-genkey?-alias?tomcat?-keyalg?RSA?(UNIX)
???????????來生成它自己的證書私鑰。
???????????
?????????默認(rèn)情況下,當(dāng)一個web應(yīng)用程序調(diào)用請求時,DNS查詢是可行的。這將對性能造
?????????成一些不利的影響,因此,你可以將“enableLookups”設(shè)置為“false”來關(guān)閉DNS
?????????查詢。當(dāng)DNS查詢被關(guān)閉時,request.getRemoteHost()將返回包含遠(yuǎn)程客戶IP地
?????????址的字符串。
??-->
????<!--?Define?a?non-SSL?Coyote?HTTP/1.1?Connector?on?port?8080?-->
????<!--?在8080端口上定義一個非SSL的HTTP/1.1連接器?-->
????<Connector?port="8080"
???????????????maxThreads="150"?minSpareThreads="25"?maxSpareThreads="75"
???????????????enableLookups="false"?redirectPort="8443"?acceptCount="100"
???????????????debug="0"?connectionTimeout="20000"?
???????????????disableUploadTimeout="true"?/>
????<!--?Note?:?To?disable?connection?timeouts,?set?connectionTimeout?value
?????to?0?-->
????<!--?注意,要關(guān)閉連接超時,將connectionTimeout設(shè)置為0?-->
<!--?Note?:?To?use?gzip?compression?you?could?set?the?following?properties?:
compression="on"?
compressionMinSize="2048"?
noCompressionUserAgents="gozilla,?traviata"?
compressableMimeType="text/html,text/xml"
-->
<!--?注意:要使用gzip壓縮需要設(shè)置如下屬性:
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla,traviata"
compressableMimeType="text/html,text/xml"
-->
????<!--?Define?a?SSL?Coyote?HTTP/1.1?Connector?on?port?8443?-->
????<!--?在端口8443上定義一個SSL的HTTP/1.1的連接器?-->
????<!--
????<Connector?port="8443"?
???????????????maxThreads="150"?minSpareThreads="25"?maxSpareThreads="75"
???????????????enableLookups="false"?disableUploadTimeout="true"
???????????????acceptCount="100"?debug="0"?scheme="https"?secure="true"
???????????????clientAuth="false"?sslProtocol="TLS"?/>
????-->
????<!--?Define?a?Coyote/JK2?AJP?1.3?Connector?on?port?8009?-->
????<!--?在端口8009上定義一個Coyote/JK2?AJP?1.3連接器?-->
????<Connector?port="8009"?
???????????????enableLookups="false"?redirectPort="8443"?debug="0"
???????????????protocol="AJP/1.3"?/>
????<!--?Define?a?Proxied?HTTP/1.1?Connector?on?port?8082?-->
????<!--?在8082端口上定義一個代理HTTP/1.1連接器?-->
????<!--?See?proxy?documentation?for?more?information?about?using?this.?-->
????<!--?參見代理文檔以取得這里使用屬性的更多的信息。?-->
????<!--
????<Connector?port="8082"?
???????????????maxThreads="150"?minSpareThreads="25"?maxSpareThreads="75"
???????????????enableLookups="false"
???????????????acceptCount="100"?debug="0"?connectionTimeout="20000"
???????????????proxyPort="80"?disableUploadTimeout="true"?/>
????-->
????<!--?An?Engine?represents?the?entry?point?(within?Catalina)?that?processes
?????????every?request.?The?Engine?implementation?for?Tomcat?stand?alone
?????????analyzes?the?HTTP?headers?included?with?the?request,?and?passes?them
?????????on?to?the?appropriate?Host?(virtual?host).?-->
????<!--?一個“Engine”(引擎)代表處理每個請求的入口點(diǎn)(在Catalina內(nèi))。這個Tomcat
?????????的標(biāo)準(zhǔn)獨(dú)立引擎實現(xiàn)分析包含在請求中的HTTP頭信息,并將請求傳送到適當(dāng)?shù)闹鳈C(jī)
?????????或虛擬主機(jī)上。-->
????<!--?You?should?set?jvmRoute?to?support?load-balancing?via?JK/JK2?ie?:
????<Engine?name="Standalone"?defaultHost="localhost"?debug="0"?jvmRoute="jvm1">?
????-->?
????<!--?你應(yīng)該這樣設(shè)置jvmRoute以便在JK/JK2通道上支持負(fù)載平衡:
????<Engine?name="Standalone"?defaultHost="localhost"?debug="0"?jvmRoute="jvm1">
????-->
?????????
????<!--?Define?the?top?level?container?in?our?container?hierarchy?-->
????<!--?在我們的容器體系中定義最高級別的容器?-->
????<Engine?name="Catalina"?defaultHost="localhost"?debug="0">
??????<!--?The?request?dumper?valve?dumps?useful?debugging?information?about
???????????the?request?headers?and?cookies?that?were?received,?and?the?response
???????????headers?and?cookies?that?were?sent,?for?all?requests?received?by
???????????this?instance?of?Tomcat.?If?you?care?only?about?requests?to?a
???????????particular?virtual?host,?or?a?particular?application,?nest?this
???????????element?inside?the?corresponding?<Host>?or?<Context>?entry?instead.
???????????For?a?similar?mechanism?that?is?portable?to?all?Servlet?2.4
???????????containers,?check?out?the?"RequestDumperFilter"?Filter?in?the
???????????example?application?(the?source?for?this?filter?may?be?found?in
???????????"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
???????????Request?dumping?is?disabled?by?default.?Uncomment?the?following
???????????element?to?enable?it.?-->
??????<!--?請求轉(zhuǎn)儲器值轉(zhuǎn)儲非常有用的通過Tomcat這個實例接收到的所有請求的,關(guān)于
???????????接收到的請求頭和cookies,以及發(fā)送出的回應(yīng)頭和cookies的調(diào)試信息。如果
???????????你只在意一個特定的虛擬主機(jī)或者一個特定應(yīng)用程序的請求,在對應(yīng)的<Host>
???????????或<Context>入口中套用這個元素。
???????????
???????????對于所有的Servlet(小服務(wù)程序)2.4來所,在示例程序中檢驗
???????????“RequestDumperFilter”過濾是非常容易的(這個過濾器源代碼可以在
???????????“$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters”下找到。
???????????
???????????請求轉(zhuǎn)儲默認(rèn)情況下是關(guān)閉的,如果要使用它,取消下面行的注釋符。-->
??????<!--
??????<Valve?className="org.apache.catalina.valves.RequestDumperValve"/>
??????-->
??????<!--?Global?logger?unless?overridden?at?lower?levels?-->
??????<!--?全局日志設(shè)置,除非在更低的級別上覆蓋它的設(shè)置?-->
??????<Logger?className="org.apache.catalina.logger.FileLogger"
??????????????prefix="catalina_log."?suffix=".txt"
??????????????timestamp="true"/>
??????<!--?Because?this?Realm?is?here,?an?instance?will?be?shared?globally?-->
??????<!--?因為這個Realm(區(qū)域)在這兒,因此這個實例將被全局共享。?-->
??????<!--?This?Realm?uses?the?UserDatabase?configured?in?the?global?JNDI
???????????resources?under?the?key?"UserDatabase".?Any?edits
???????????that?are?performed?against?this?UserDatabase?are?immediately
???????????available?for?use?by?the?Realm.?-->
??????<!--?這個Realm(區(qū)域)使用在全局JNDI資源下,由“UserDatabase”配置的用戶
???????????數(shù)據(jù)庫。通過使用Realm將使對于這個用戶數(shù)據(jù)庫的任何編輯都將會立即可用
??????<Realm?className="org.apache.catalina.realm.UserDatabaseRealm"
?????????????????debug="0"?resourceName="UserDatabase"/>
??????<!--?Comment?out?the?old?realm?but?leave?here?for?now?in?case?we
???????????need?to?go?back?quickly?-->
??????<!--?注釋掉舊有的Realm以便我們能很快速的恢復(fù)舊有配置。?-->
??????<!--
??????<Realm?className="org.apache.catalina.realm.MemoryRealm"?/>
??????-->
??????<!--?Replace?the?above?Realm?with?one?of?the?following?to?get?a?Realm
???????????stored?in?a?database?and?accessed?via?JDBC?-->
??????<!--?下面的屬性用于從儲存在數(shù)據(jù)庫或從JDBC通道中得到的Realm以取代上面的
???????????Realm配置。-->
??????<!--
??????<Realm?className="org.apache.catalina.realm.JDBCRealm"?debug="99"
?????????????driverName="org.gjt.mm.mysql.Driver"
??????????connectionURL="jdbc:mysql://localhost/authority"
?????????connectionName="test"?connectionPassword="test"
??????????????userTable="users"?userNameCol="user_name"?userCredCol="user_pass"
??????????userRoleTable="user_roles"?roleNameCol="role_name"?/>
??????-->
??????<!--
??????<Realm?className="org.apache.catalina.realm.JDBCRealm"?debug="99"
?????????????driverName="oracle.jdbc.driver.OracleDriver"
??????????connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
?????????connectionName="scott"?connectionPassword="tiger"
??????????????userTable="users"?userNameCol="user_name"?userCredCol="user_pass"
??????????userRoleTable="user_roles"?roleNameCol="role_name"?/>
??????-->
??????<!--
??????<Realm?className="org.apache.catalina.realm.JDBCRealm"?debug="99"
?????????????driverName="sun.jdbc.odbc.JdbcOdbcDriver"
??????????connectionURL="jdbc:odbc:CATALINA"
??????????????userTable="users"?userNameCol="user_name"?userCredCol="user_pass"
??????????userRoleTable="user_roles"?roleNameCol="role_name"?/>
??????-->
??????<!--?Define?the?default?virtual?host
???????????Note:?XML?Schema?validation?will?not?work?with?Xerces?2.2.
???????-->
??????<!--?定義默認(rèn)的虛擬主機(jī)
???????????注意:XML模式確認(rèn)將不能與Xerces?2.2同工作。
??????-->
??????<Host?name="localhost"?debug="0"?appBase="webapps"
???????unpackWARs="true"?autoDeploy="true"
???????xmlValidation="false"?xmlNamespaceAware="false">
????????<!--?Defines?a?cluster?for?this?node,
?????????????By?defining?this?element,?means?that?every?manager?will?be?changed.
?????????????So?when?running?a?cluster,?only?make?sure?that?you?have?webapps?in?there
?????????????that?need?to?be?clustered?and?remove?the?other?ones.
?????????????A?cluster?has?the?following?parameters:
?????????????為這個結(jié)點(diǎn)定義一個群集,通過定義這個元素,意味著每個管理員都將被改變。
?????????????因此,當(dāng)運(yùn)行一個群集時,只有確認(rèn)在必須被聚集和移除其他的地方有你的
?????????????web軟件。
?????????????一個群集有下面這些參數(shù):
?????????????className?=?the?fully?qualified?name?of?the?cluster?class
?????????????className?=?這個群集類的全限定名
?????????????name?=?a?descriptive?name?for?your?cluster,?can?be?anything
?????????????name?=?你的群集的描述名,可以是任何描述
?????????????debug?=?the?debug?level,?higher?means?more?output
?????????????debug?=?調(diào)試級別,更高意味著更多的輸出
?????????????mcastAddr?=?the?multicast?address,?has?to?be?the?same?for?all?the?nodes
?????????????mcastAddr?=?多播地址,所有的節(jié)點(diǎn)都必須有同樣的多播地址
?????????????mcastPort?=?the?multicast?port,?has?to?be?the?same?for?all?the?nodes
?????????????mcastPort?=?多播端口,對所有的節(jié)點(diǎn)都必須有同樣的多播端口
?????????????
?????????????mcastBindAddr?=?bind?the?multicast?socket?to?a?specific?address
?????????????mcastBindAddr?=?綁定多播套接字到一個指定的地址
?????????????
?????????????mcastTTL?=?the?multicast?TTL?if?you?want?to?limit?your?broadcast
?????????????mcastTTL?=?多播生存期,如果你想要限制你的廣播的話
?????????????
?????????????mcastSoTimeout?=?the?multicast?readtimeout
?????????????mcastSoTimeout?=?多播讀取超時
?????????????mcastFrequency?=?the?number?of?milliseconds?in?between?sending?a?"I'm?alive"?heartbeat
?????????????mcastFrequency?=?發(fā)送“I'm?alive”(我還活著)信息的間隔毫秒數(shù)
?????????????mcastDropTime?=?the?number?a?milliseconds?before?a?node?is?considered?"dead"?if?no?heartbeat?is?received
?????????????mcastDropTime?=?多長時間沒有收到“I'm?alive”就將這個節(jié)點(diǎn)標(biāo)識為死節(jié)點(diǎn)(單位:毫秒)
?????????????tcpThreadCount?=?the?number?of?threads?to?handle?incoming?replication?requests,?optimal?would?be?the?same?amount?of?threads?as?nodes?
?????????????tcpThreadCount?=?用于處理重復(fù)引入請求的線程數(shù),最好是每個節(jié)點(diǎn)都有相同的線程數(shù)
?????????????tcpListenAddress?=?the?listen?address?(bind?address)?for?TCP?cluster?request?on?this?host,?
????????????????????????????????in?case?of?multiple?ethernet?cards.
????????????????????????????????auto?means?that?address?becomes
????????????????????????????????InetAddress.getLocalHost().getHostAddress()
?????????????tcpListenAddress?=?在有多塊以太網(wǎng)卡的主機(jī)上的監(jiān)聽TCP群集請求的地址(綁定地址),
????????????????????????????????auto意味著地址由InetAddress.getLocalHost().getHostAddress()取得。
?????????????tcpListenPort?=?the?tcp?listen?port
?????????????tcpListenPort?=?tcp監(jiān)聽端口
?????????????tcpSelectorTimeout?=?the?timeout?(ms)?for?the?Selector.select()?method?in?case?the?OS
??????????????????????????????????has?a?wakup?bug?in?java.nio.?Set?to?0?for?no?timeout
?????????????tcpSelectorTimeout?=?在操作系統(tǒng)中有java.nio喚醒錯的情況下,使用Selector.select()的超時
??????????????????????????????????毫秒數(shù)。設(shè)為0則沒有超時限制
?????????????printToScreen?=?true?means?that?managers?will?also?print?to?std.out
?????????????printToScreen?=?true意味著管理員的相關(guān)信息也將打印輸出到std.out
?????????????expireSessionsOnShutdown?=?true?means?that
?????????????expireSessionsOnShutdown?=?true?意味著?????
?????????????useDirtyFlag?=?true?means?that?we?only?replicate?a?session?after?setAttribute,removeAttribute?has?been?called.
????????????????????????????false?means?to?replicate?the?session?after?each?request.
????????????????????????????false?means?that?replication?would?work?for?the?following?piece?of?code:
????????????????????????????<%
????????????????????????????HashMap?map?=?(HashMap)session.getAttribute("map");
????????????????????????????map.put("key","value");
????????????????????????????%>
?????????????useDirtyFlag?=?true意味著我們只能在調(diào)用setAttribute,removeAttribute后才能復(fù)制一個會話;
????????????????????????????false意味著在每個請求后復(fù)制會話。
????????????????????????????false意味著復(fù)制將以下列代碼方式工作:
????????????????????????????<%
????????????????????????????HashMap?map?=?(HashMap)session.getAttribute("map");
????????????????????????????map.put("key","value");
????????????????????????????%>
????????????????????????????
?????????????replicationMode?=?can?be?either?'pooled',?'synchronous'?or?'asynchronous'.
???????????????????????????????*?Pooled?means?that?the?replication?happens?using?several?sockets?in?a?synchronous?way.?Ie,?the?data?gets?replicated,?then?the?request?return.?This?is?the?same?as?the?'synchronous'?setting?except?it?uses?a?pool?of?sockets,?hence?it?is?multithreaded.?This?is?the?fastest?and?safest?configuration.?To?use?this,?also?increase?the?nr?of?tcp?threads?that?you?have?dealing?with?replication.
???????????????????????????????*?Synchronous?means?that?the?thread?that?executes?the?request,?is?also?the
???????????????????????????????thread?the?replicates?the?data?to?the?other?nodes,?and?will?not?return?until?all
???????????????????????????????nodes?have?received?the?information.
???????????????????????????????*?Asynchronous?means?that?there?is?a?specific?'sender'?thread?for?each?cluster?node,
???????????????????????????????so?the?request?thread?will?queue?the?replication?request?into?a?"smart"?queue,
???????????????????????????????and?then?return?to?the?client.
???????????????????????????????The?"smart"?queue?is?a?queue?where?when?a?session?is?added?to?the?queue,?and?the?same?session
???????????????????????????????already?exists?in?the?queue?from?a?previous?request,?that?session?will?be?replaced
???????????????????????????????in?the?queue?instead?of?replicating?two?requests.?This?almost?never?happens,?unless?there?is?a?
???????????????????????????????large?network?delay.
?????????????replicationMode?=?可以是“pooled”、“synchronous”或者“asynchronous”
???????????????????????????????*?Pooled意味著在多個套接字上同步進(jìn)行復(fù)制。例如,先復(fù)制數(shù)據(jù),然后請求返回。
???????????????????????????????這與“synchronous”相同,除了它使用一個套接字池,因此,它是多線程的。它是
???????????????????????????????最快和最高級的設(shè)置,使用這個配置也增加了處理復(fù)制的tcp線程的域。
???????????????????????????????*?Synchronous指執(zhí)行請求的線程,它也是向其他節(jié)點(diǎn)復(fù)制數(shù)據(jù)的線程,并且直到
???????????????????????????????所有的節(jié)點(diǎn)都己經(jīng)收到信息后才返回。
???????????????????????????????*?Asynchronous,對每個群集節(jié)點(diǎn)而言,這是一個特別的“sender”(發(fā)送者)線程,
???????????????????????????????因此請求線程將復(fù)制請求排隊到一個小隊列中,然后,返回給用戶。
???????????????????????????????這個小隊列是一個當(dāng)會話被添加到隊列中,而從先前的請求中,同一個會話己經(jīng)存在
???????????????????????????????,這個會話將被放置在隊列中以代替重復(fù)的兩個請求。這幾乎從不會發(fā)生,除非存在
???????????????????????????????較大的網(wǎng)絡(luò)延遲。
????????-->?
????????<!--
????????????When?configuring?for?clustering,?you?also?add?in?a?valve?to?catch?all?the?requests
????????????coming?in,?at?the?end?of?the?request,?the?session?may?or?may?not?be?replicated.
????????????A?session?is?replicated?if?and?only?if?all?the?conditions?are?met:
????????????1.?useDirtyFlag?is?true?or?setAttribute?or?removeAttribute?has?been?called?AND
????????????2.?a?session?exists?(has?been?created)
????????????3.?the?request?is?not?trapped?by?the?"filter"?attribute
????????????The?filter?attribute?is?to?filter?out?requests?that?could?not?modify?the?session,
????????????hence?we?don't?replicate?the?session?after?the?end?of?this?request.
????????????The?filter?is?negative,?ie,?anything?you?put?in?the?filter,?you?mean?to?filter?out,
????????????ie,?no?replication?will?be?done?on?requests?that?match?one?of?the?filters.
????????????The?filter?attribute?is?delimited?by?;,?so?you?can't?escape?out?;?even?if?you?wanted?to.
????????????filter=".*\.gif;.*\.js;"?means?that?we?will?not?replicate?the?session?after?requests?with?the?URI
????????????ending?with?.gif?and?.js?are?intercepted.
????????-->
????????<!--?當(dāng)配置群集時,你也添加一個值來捕獲所有傳入的請求,在請求結(jié)束時,這個會話可能被子復(fù)制,
?????????????也可能不被復(fù)制。一個會話是否復(fù)制取決于下列條件是否發(fā)生:
?????????????1.?useDirtyFlag為真,或者setAttribute或者removeAttribute己經(jīng)被調(diào)用。
?????????????2.?會話己經(jīng)存在(己經(jīng)被創(chuàng)建了)。
?????????????3.?請求沒有被“filter”屬性所捕獲。
?????????????
?????????????這個filter(過濾器)屬性用于過濾那些不能修改會話的請求,因此,我們在這個請求結(jié)束后不復(fù)制
?????????????會主。這個過濾器是消極的,例如,你向過濾器發(fā)送了一些東西,然后被過濾出去,在那個匹配的過
?????????????濾器上不會發(fā)生復(fù)制。
?????????????過濾器屬性以分號為分隔,因此你不能換行,即使你想這么做。
?????????????
?????????????filter=".*\.gif;.*\.js;"意味著在進(jìn)行以.gif和.js結(jié)束的URI請求后不復(fù)制會話。
????????
????????<!--
????????<Cluster?className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
?????????????????managerClassName="org.apache.catalina.cluster.session.DeltaManager"
?????????????????expireSessionsOnShutdown="false"
?????????????????useDirtyFlag="true">
????????????<Membership?
????????????????className="org.apache.catalina.cluster.mcast.McastService"
????????????????mcastAddr="228.0.0.4"
????????????????mcastPort="45564"
????????????????mcastFrequency="500"
????????????????mcastDropTime="3000"/>
????????????<Receiver?
????????????????className="org.apache.catalina.cluster.tcp.ReplicationListener"
????????????????tcpListenAddress="auto"
????????????????tcpListenPort="4001"
????????????????tcpSelectorTimeout="100"
????????????????tcpThreadCount="6"/>
????????????<Sender
????????????????className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
????????????????replicationMode="pooled"/>
????????????<Valve?className="org.apache.catalina.cluster.tcp.ReplicationValve"
???????????????????filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
????????</Cluster>
????????-->?
????????<!--?Normally,?users?must?authenticate?themselves?to?each?web?app
?????????????individually.?Uncomment?the?following?entry?if?you?would?like
?????????????a?user?to?be?authenticated?the?first?time?they?encounter?a
?????????????resource?protected?by?a?security?constraint,?and?then?have?that
?????????????user?identity?maintained?across?*all*?web?applications?contained
?????????????in?this?virtual?host.?-->
????????<!--?通常,對每一個應(yīng)用程序,用戶必須逐個的認(rèn)證他們自己。當(dāng)他們遇到被
?????????????某種安全約束所保護(hù)的資源時,如果你想讓用戶只在第一次被認(rèn)證,那么,
?????????????取消下面入口行的注釋,然后在這個虛擬主機(jī)中包含這個用戶的,橫跨所有
?????????????web應(yīng)用程序的用戶身份識別。-->
?????????????
????????<!--
????????<Valve?className="org.apache.catalina.authenticator.SingleSignOn"
???????????????????debug="0"/>
????????-->
????????<!--?Access?log?processes?all?requests?for?this?virtual?host.?By
?????????????default,?log?files?are?created?in?the?"logs"?directory?relative?to
?????????????$CATALINA_HOME.?If?you?wish,?you?can?specify?a?different
?????????????directory?with?the?"directory"?attribute.?Specify?either?a?relative
?????????????(to?$CATALINA_HOME)?or?absolute?path?to?the?desired?directory.
????????-->
????????<!--?這個虛擬主機(jī)的所有請求的訪問日志過程。默認(rèn)情況下,日志文件被創(chuàng)建在相對
?????????????于$CATALINA_HOME目錄下的logs目錄下。通過directory屬性,你也可以指定一個
?????????????不同的目錄,如果你想的話??梢允褂孟鄬β窂剑ㄏ鄬τ?CATALINA_HOME),也
?????????????可以使用絕對路徑。-->
????????<!--
????????<Valve?className="org.apache.catalina.valves.AccessLogValve"
?????????????????directory="logs"?prefix="localhost_access_log."?suffix=".txt"
?????????????????pattern="common"?resolveHosts="false"/>
????????-->
????????<!--?Logger?shared?by?all?Contexts?related?to?this?virtual?host.?By
?????????????default?(when?using?FileLogger),?log?files?are?created?in?the?"logs"
?????????????directory?relative?to?$CATALINA_HOME.?If?you?wish,?you?can?specify
?????????????a?different?directory?with?the?"directory"?attribute.?Specify?either?a
?????????????relative?(to?$CATALINA_HOME)?or?absolute?path?to?the?desired
?????????????directory.-->
????????<!--?與這個虛擬主機(jī)有關(guān)系所有上下文所共享的日志。默認(rèn)情況下(使用FileLogger時),
?????????????日志文件被創(chuàng)建在相對于$CATALINA_HOME目錄下的logs目錄下。如果你希望,你也可
?????????????以給directory指定一個不同的路徑。可以使用相對于$CATALINA_HOME的相對路徑,也
?????????????可以使用絕對路徑。
????????<Logger?className="org.apache.catalina.logger.FileLogger"
?????????????????directory="logs"?prefix="localhost_log."?suffix=".txt"
????????????timestamp="true"/>
??????</Host>
????</Engine>
??</Service>
</Server>
當(dāng)Tomcat5啟動以后,它創(chuàng)建一系列類加載器。這些類加載器以父子關(guān)系組織在一起,父類加載器在子類加載器的上面:
????????? |
?????? System
????????? |
?????? Common
????? /????? \
Catalina?? Shared
?????????????????? ? /?? \
??????? Webapp1? Webapp2 ...
這些類加載器所扮演的角色,以及它們可以見到的類和資源的規(guī)則如下:
如上圖所示,Tomcat5 在初始化的時候創(chuàng)建如下類加載器:
Bootstrap - 這個類加載器可以加載Java虛擬機(jī)的運(yùn)行時基礎(chǔ)類,以及在系統(tǒng)擴(kuò)展目錄($JAVA_HOME/jre/lib/ext
)中的所有Jar包中的類。注意-一些JVM可能用多個類加載器來實現(xiàn)它,或者它是根本不能被看見的。
System - 這個類加載器一般可以加載CLASSPATH環(huán)境變量的內(nèi)容。所有這個類對于Tomcat內(nèi)部的類和web應(yīng)用程序的都是可見的。盡管如此,標(biāo)準(zhǔn)的Tomcat5啟動腳本($CATALINA_HOME/bin/catalina.sh
?或 %CATALINA_HOME%\bin\catalina.bat
)都會忽略CLASSPATH環(huán)境變量,取而代之的是從如下倉庫加載:
- $CATALINA_HOME/bin/bootstrap.jar - 包含Tomcat5 服務(wù)器初始化的main()方法,以及所需的類加載器的實現(xiàn)類。
- $JAVA_HOME/lib/tools.jar - 包括把JSP頁面編譯成Serlet類所需的"javac"編譯器.
- $CATALINA_HOME/bin/commons-logging-api.jar - Jakarta commons logging API.
- $CATALINA_HOME/bin/commons-daemon.jar - Jakarta commons daemon API.
- jmx.jar - The JMX 1.2 實現(xiàn).
Common - 這個類加載器可以使一些附加的類對于Tomcat 內(nèi)部的類和web應(yīng)用程序可見。正常情況下,應(yīng)用程序不應(yīng)該替換它。所有$CATALINA_HOME/common/classes目錄下的未打包類和 資源,以及$CATALINA_HOME/commons/endorsed、$CATALINA_HOME/commons/i18n、$ CATALINA_HOME/common/lib目錄下的Jar包中的類和資源都是這個類加載器的加載對象。默認(rèn)情況,包括如下內(nèi)容:?????????
- commons-el.jar - Jakarta commons el, Jasper用的EL表達(dá)式實現(xiàn)
- jasper-compiler.jar - The JSP 2.0 編譯器.
- jasper-compiler-jdt.jar - The Eclipse JDT Java 編譯器.
- jasper-runtime.jar - The JSP 2.0 運(yùn)行庫.
- jsp-api.jar - The JSP 2.0 API.
- naming-common.jar - Tomcat5的JNDI 實現(xiàn),用于內(nèi)存命名環(huán)境
- naming-factory.jar - Tomcat5的JNDI 實現(xiàn),用于企業(yè)級資源引用(EJB, connection pools).
- naming-factory-dbcp.jar - Jakarta commons DBCP, 為Web應(yīng)用程序提供JDBC連接池。這個類已經(jīng)從默認(rèn)的org.apache.commons包中移出。
- naming-java.jar -? java命名空間處理器.
- naming-resources.jar - The specialized JNDI naming context implementation used to represent the static resources of a web application. This is not related to the support of the J2EE ENC, and cannot be removed.
- servlet-api.jar - The Servlet 2.4 API.
- tomcat-i18n-**.jar - Optional JARs containing resource bundles for other languages. As default bundles are also included in each individual JAR, they can be safely removed if no internationalization of messages is needed.
Catalina - 這個類加載器主要加載Tomcat5自己所需要的類和資源。這些類和資源對于Web應(yīng)用程序是完全不可見的。在$CATALINA_HOME/server/classes目錄下的所有類和資源,$CATALINA_HOME/server/lib下的所有Jar包中類和資源是這個類加載器的加載對象。默認(rèn)情況,包括個如下內(nèi)容:
- catalina.jar - Tomcat5中Catalina Servlet容器的實現(xiàn)部分。
- catalina-ant.jar - 在管理web應(yīng)用程序時要用倒的一些Ant任務(wù)。
- catalina-optional.jar - 一些Catalina可選組件。
- commons-modeler.jar - Tomcat通過JMX暴露其內(nèi)部對象是用的一些MBean實現(xiàn)。
- servlets-xxxxx.jar - 這些類同內(nèi)部的Servlet一起提供Tomcat的部分功能,它們都是獨(dú)立的,所以如果不需要相應(yīng)的服務(wù)可以將其刪除?;蛘咚鼈兛梢詮膶儆谔囟ǖ陌踩芾砥?。
- tomcat-coyote.jar - Coyote API.。
- tomcat-http.jar - 標(biāo)準(zhǔn)的Java HTTP/1.1 連接器.。
- tomcat-ajp.jar -?
AJP
web?服務(wù)器的連接器,一般用于Apache,iPlanet iAS和 iWS.。 - tomcat-util.jar - Tomcat連接器需要的工具類。
Shared - 這個類加載器用于把一些類和資源共享給所有的web應(yīng)用程序。(除非Tomcat內(nèi)部的類也需要訪問這些類,在這種情況下你應(yīng)該把它們放在Common類加載能加載的地方). 在$CATALINA_BASE/shared/classes 目錄下的所有未打包類和資源,以及$CATALINA_BASE/shared/lib目錄下的所有Jar包中的類和資源可以被其加載。如果通過$ CATALINA_BASE環(huán)境變量來從同一個tomcat程序運(yùn)行了多個在實例,那么這個類加載器的倉庫是相對于$CATALINA_BASE而不是$ CATALINA_HOME。?
WebappX - 系統(tǒng)會為部署在一個Tomcat實例中的每個應(yīng)用程序創(chuàng)建一個這樣的類加載器,它們?yōu)樗鶎俚膽?yīng)用程序加載類。所有你的web應(yīng)用程序包的/WEB-INF/classes目錄下的類和資源,以及
/WEB-INF/lib 目錄下的所有Jar包中的類和資源是這個類的加載對象。這些類和資源僅對這個應(yīng)用程序可見,并且這個應(yīng)用程序也看不見其他應(yīng)用程序的類和資源。
就像上面所描述的,web應(yīng)用程序的類加載的加載流程與默認(rèn)的Java 2的類記載托管模型是不一樣的。當(dāng)有一個請求需要應(yīng)用程序的WebappX 類加載器加載一個類的時候,這個類加載器是首先到
自己的倉庫中查找,而不是先交給上面的類加載器查找。這里有一些例外。JRE的基礎(chǔ)類是不能被覆蓋的。對于其他一些類(如J2SE
1.4+中的XML解析器組件),可以使用J2SE1.4的簽名特性。最后任何包括servlet
API類的Jar包會被忽略。Tomcat5中的其他的類加載器使用正常托管模式。
這樣在一個web應(yīng)用程序中,類和資源的加載順序是這樣:
- Bootstrap classes of your JVM
- System class loader classses (described above)
- /WEB-INF/classes of your web application
- /WEB-INF/lib/*.jar of your web application
- $CATALINA_HOME/common/classes
- $CATALINA_HOME/common/endorsed/*.jar
- $CATALINA_HOME/common/i18n/*.jar
- $CATALINA_HOME/common/lib/*.jar
- $CATALINA_BASE/shared/classes
- $CATALINA_BASE/shared/lib/*.jar
模式/含義/內(nèi)容描述
*
匹配任意元素。(通用選擇器)
E
匹配任意元素 E (例如一個類型為 E 的元素)。(類型選擇器)
E F
匹配元素 E 的任意后代元素 F 。(后代選擇器)
E > F
匹配元素 E 的任意子元素 F 。(子選擇器)
E:first-child
當(dāng)元素 E 是它的父元素中的第一個子元素時,匹配元素 E 。(:first-child 偽類)
E:link E:visited
如果 E 是一個目標(biāo)還沒有訪問過(:link)或者已經(jīng)訪問過(:visited)的超鏈接的源錨點(diǎn)時匹配元素 E 。(link 偽類)
E:active E:hover E:focus
在確定的用戶動作中匹配 E 。(動態(tài)偽類)
E:lang(c)
如果類型為 E 的元素使用了(人類)語言 c (文檔語言確定語言是如何被確定的),則匹配該元素。(:lang() 偽類)
E + F
如果一個元素 E 直接在元素 F 之前,則匹配元素 F 。(臨近選擇器)
E[foo]
匹配具有”foo”屬性集(不考慮它的值)的任意元素 E 。(屬性選擇器)
E[foo="warning"]
匹配其“foo”屬性值嚴(yán)格等于“warning”的任意元素 E 。(屬性選擇器)
E[foo~="warning"]
匹配其“foo”屬性值為空格分隔的值列表,并且其中一個嚴(yán)格等于“warning”的任意元素 E 。(屬性選擇器)
E[lang|="en"]
匹配其“l(fā)ang”屬性具有以“en”開頭(從左邊)的值的列表的任意元素 E 。(屬性選擇器)
DIV.warning
僅 HTML。用法同 DIV[class~="warning"]。(類選擇器)
E#myid
匹配 ID 等于“myid”的任意元素 E 。(ID 選擇器)
Quote
From:http://www.w3.org/TR/CSS2/selector.html
我們用下面的例子來解釋“父元素”、“子元素”、“父/子”及“相鄰”這幾個概念。
<div title="這是一個div">
<h1>這是是h1的內(nèi)容</h1>
<p>這是一個段落p的內(nèi)容!<strong>這里是strong的內(nèi)容</strong>這是一個段落p的內(nèi)容!</p>
</div>
從以上代碼中,我們可以找出這樣的關(guān)系:
h1 和 p 同為 div 的“兒子”,兩者分別同 div 形成“父/子”關(guān)系。
h1,p,strong 都是 div 的“子元素”。(三者都包含在 div 之內(nèi))
div 是 h1 和 p 的“父元素”。
strong 和 p 形成“父/子”關(guān)系,strong 的“父元素”是 p 。
但 strong 和 div 并非“父/子”關(guān)系,而是“祖孫”關(guān)系,但 strong 依然是 div 的“子(孫)元素”。
div 是 h1 p strong 三者的“祖先”,三者是 div 的“子(孫)元素”。
h1 和 p 兩者是相鄰的。
繼承上面的實例來具體演示一下E F的關(guān)系:假如,我們需要將 strong 內(nèi)的內(nèi)容二字變?yōu)榫G色,我們可以有哪些方法呢?
div strong {color:green;} /* - 正確。strong 是 div 的“子元素”*/
p > strong {color:green;} /* - 正確。strong 和 p 是“父/子”關(guān)系*/
div > strong {color:green;} /* - 錯誤!strong 雖然是 div 的“子(孫)元素”,但兩者乃是“祖孫”關(guān)系,而非“父/子”關(guān)系,因此不能用 > 符號連接*/
臨近選擇器和通用選擇器:通用選擇器以星號“*”表示,可以用于替代任何 tag 。
實例:
h2 + * { color:green }/*所有緊隨 h2 的元素內(nèi)的文字都將呈現(xiàn)紅色*/
二.選擇符分類介紹
1.通配選擇符
語法:
* { sRules }
說明:
通配選擇符。選定文檔目錄樹(DOM)中的所有類型的單一對象。
假如通配選擇符不是單一選擇符中的唯一組成,“*”可以省略。
示例:
*[lang=fr] { font-size:14px; width:120px; }
*.div { text-decoration:none; }
2.類型選擇符
語法:
E { sRules }
說明:
類型選擇符。以文檔語言對象(Element)類型作為選擇符。
示例:
td { font-size:14px; width:120px; }
a { text-decoration:none; }
3.屬性選擇符
語法:
E [ attr ] { sRules }
E [ attr = value ] { sRules }
E [ attr ~= value ] { sRules }
E [ attr |= value ] { sRules }
說明:
屬性選擇符。
選擇具有 attr 屬性的 E
選擇具有 attr 屬性且屬性值等于 value 的 E
選擇具有 attr 屬性且屬性值為一用空格分隔的字詞列表,其中一個等于 value 的 E 。這里的 value 不能包含空格
選擇具有 attr 屬性且屬性值為一用連字符分隔的字詞列表,由 value 開始的 E
示例:
h[title] { color: blue; }
/* 所有具有title屬性的h對象 */
span[class=demo] { color: red; }
div[speed="fast"][dorun="no"] { color: red; }
a[rel~="copyright"] { color:black; }
4.包含選擇符
語法:
E1 E2 { sRules }
說明:
包含選擇符。選擇所有被 E1 包含的 E2 。即 E1.contains(E2)==true 。
示例:
table td { font-size:14px; }
div.sub a { font-size:14px; }
5.子對象選擇符
語法:
E1 > E2 { sRules }
說明:
子對象選擇符。選擇所有作為 E1 子對象的 E2 。
示例:
body > p { font-size:14px; }
/* 所有作為body的子對象的p對象字體尺寸為14px */
div ul>li p { font-size:14px; }
6.ID選擇符
語法:
#ID { sRules }
說明:
ID選擇符。以文檔目錄樹(DOM)中作為對象的唯一標(biāo)識符的 ID 作為選擇符。
示例:
#note { font-size:14px; width:120px;}
7.類選擇符
語法:
E.className { sRules }
說明:
類選擇符。在HTML中可以使用此種選擇符。其效果等同于E [ class ~= className ] 。請參閱屬性選擇符( Attribute Selectors )。
在IE5+,可以為對象的 class 屬性(特性)指定多于一個值( className ),其方法是指定用空格隔開的一組樣式表的類名。例如:<div class="class1 class2">。
示例:
div.note { font-size:14px; }
/* 所有class屬性值等于(包含)"note"的div對象字體尺寸為14px */
.dream { font-size:14px; }
/* 所有class屬性值等于(包含)"note"的對象字體尺寸為14px */
8.選擇符分組
語法:
E1 , E2 , E3 { sRules }
說明:
選擇符分組。將同樣的定義應(yīng)用于多個選擇符,可以將選擇符以逗號分隔的方式并為組。
示例:
.td1,div a,body { font-size:14px; }
td,div,a { font-size:14px; }
9.偽類及偽對象選擇符
語法:
E : Pseudo-Classes { sRules }
E : Pseudo-Elements { sRules }
說明:
偽類及偽對象選擇符。
偽類選擇符。請參閱偽類( Pseudo-Classes )[:link :hover :active :visited :focus :first-child :first :left :right :lang]。
偽對象選擇符。請參閱偽對象( Pseudo-Elements )[:first-letter :first-line :before :after]。
示例:
div:first-letter { font-size:14px; }
a.fly :hover { font-size:14px; color:red; }
在1g內(nèi)存下.用這個參數(shù)很管用. 速度感覺加快
eclipse.exe -vmargs -xverify:none -xx:+useparallelgc -xx:permsize=20m -xms64m -xmx512m