posts - 0,  comments - 17,  trackbacks - 0
          來源:http://www.aygfsteel.com/konhon/archive/2006/03/29/38012.html
          < description >   < display >   < icon > 
          這三個(gè)元素提供了Web容器部署工具用描述應(yīng)用的信息.

           
          < icon > 
             
          < small-icon > /images/small.gif </ small-icon >   <!-- 16*16 --> 
             
          < large-icon > /images/large.jpg </ large-icon >   <!-- 32*32 --> 
           
          </ icon > 
           
          < display-name > The applicaiton name </ display-name > 
           
          < description > A longer description of the application </ description > 
           
           
          < distrubutable > 
           
          < distributable > 元素用於告知Web容器: 應(yīng)用設(shè)計(jì)為在分布式Web容器中運(yùn)行.此元素不含體.

           
          < context-param > 
          通過使用 
          < context-param > 元素, 可以定義對(duì)應(yīng)用的所有組件(servlet和JSP頁(yè)面)都可用的上下文參數(shù).

           
          < context-param > 
             
          < param-name > jdbcURL </ param-name > 
             
          < param-value > jdbc:Microsoft:sqlserver://localhost:1433;databasename='aa' </ param-value > 
           
          </ context-param > 
           
           
          < filter > 
           
          < filter > 元素可以注冊(cè)一個(gè)過濾器組件.

           
          < filter > 
             
          < filter-name > accessControl </ filter-name > 
             
          < fitler-class > com.mycomp.AccessControlFilter </ filter-class > 
             
          < init-param > 
                
          < param-name > loginPage </ param-name > 
                
          < param-value > /login.jsp </ param-name > 
             
          </ init-param > 
           
          </ filter > 
           
           
          < filter-mapping > 
          能過使用 
          < filter-mapping > 元素, 可以將過濾器映射至一個(gè)URI模式, 或者映射至一個(gè)Servlet.

           
          < filter-mapping > 
             
          < filter-name > accessControl </ filter-name > 
             
          < url-pattern > /protected </ url-pattern > 
           
          </ filter-mapping > 
           
          < filter-mapping > 
             
          < filter-name > accessControl </ filter-name > 
             
          < servlet-name > servletName </ servlet-name > 
           
          < filter-mapping > 
           
           
           
          < listener > 
           
          < listener > 用於注冊(cè)一個(gè)監(jiān)聽組件.

           
          < listener > 
             
          < listener-class > com.mycomp.AppInitListener </ listener-class > 
           
          </ listener > 
           
           
          < servlet > 
           
          < servlet > 定義了Servlet或JSP頁(yè)面的細(xì)節(jié). 最常見的情況是, 此元素僅把一個(gè)Servlet或JSP頁(yè)面與一個(gè)短名相

          關(guān)聯(lián), 並指定初始化參數(shù):
           
          < servlet > 
             
          < servlet-name > purchase </ servlet-name > 
             
          < servlet-class > com.mycomp.servlets.PurchaseServlet </ server-class > 
             
          < init-param > 
                
          < param-name > maxAmount </ param-name > 
                
          < param-value > 500.00 </ param-value > 
             
          </ init-param > 
           
          </ servlet > 
           
          < servlet > 
             
          < servlet-name > order-form </ servlet-name > 
             
          < jsp-file > /po/orderform.jsp </ jsp-file > 
             
          < init-param > 
                
          < param-name > bgColor </ param-name > 
                
          < param-value > blue </ param-value > 
             
          </ init-param > 
           
          </ servlet > 
           
           
          < load-on-starup > 子元素可以告訴容器在應(yīng)用開始時(shí)加載Servlet.這個(gè)值是一個(gè)正整數(shù), 指示了Servlet相對(duì)於

          其它Servlet的加載時(shí)間.此值較小的Servlet要早於值較大的Servlet得到加載.
           
          < servlet > 
             
          < servlet-name > controller </ servlet-name > 
             
          < servlet-class > com.mycomp.servlets.ControllerServlet </ servlet-class > 
             
          < load-on-starup > 1 </ load-on-starup > 
           
          </ servlet > 
           
           
          < servlet-mapping > 
           
          < servlet-mapping > 元素將一個(gè)Servlet或JSP頁(yè)面映射至一個(gè)URL模式.

          路徑前綴模式:
           
          < servlet-mapping > 
             
          < servlet-name > purchase </ servlet-name > 
             
          < url-pattern > /po/* </ url-pattern > 
           
          </ servlet-mapping > 
          完全匹模模工:
           
          < servlet-mapping > 
             
          < servlet-name > sales-report </ servlet-name > 
             
          < url-pattern > /report </ url-pattern > 
           
          < servlet-mapping > 
          擴(kuò)展名映射模式:
           
          < servlet-mapping > 
             
          < servlet-name > XMLProcessor </ servlet-name > 
             
          < url-pattern > *.xml </ url-pattern > 
           
          </ servlet-mapping > 
           
           
          < session-config > 
           
          < session-config > 元素可以定制會(huì)話處理屬性.在一個(gè)部署描述文件中只能使用一個(gè)此類元素.

           
          < session-config > 
             
          < session-timeout > 30 </ session-timeout > 
           
          </ session-config > 
           
           
          < mime-mapping > 
           
          < mime-mapping > 元素可以定義應(yīng)用所需的映射.
          Servlet可能需要了解一個(gè)文件擴(kuò)展名對(duì)應(yīng)於哪一種mime類型, 而使用此元素即可以定義這樣一個(gè)映射:

           
          < mime-mapping > 
             
          < extension > wml </ extension > 
             
          < mime-type > text/vnd.wap.wml </ mime-type > 
           
          </ mime-mapping > 
           
           
          < welcome-file-list > 
           
          < welcome-file-list > 元素可以定義要在目錄中查找並提供文件的有序表.如果使用了多個(gè)此類元素, 容器會(huì)將

          其合並.

           
          < welcome-file-list > 
             
          < welcome-file > index.html </ welcome-file > 
             
          < welcome-file > index.htm </ welcome-file > 
             
          < welcome-file > default.html </ welcome-file > 
             
          < welcome-file > default.htm </ welcome-file > 
           
          </ welcome-file-list > 
           
           
          < error-page > 
           
          < error-page > 元素可以定義向用戶告知各種錯(cuò)誤的頁(yè)面.

           
          < error-page > 
             
          < error-code > 404 </ error-code > 
             
          < location > /errors/404.html </ location > 
           
          </ error-page > 
           
           
          < error-page > 
             
          < exception-type > javax.servlet.ServletException </ exception-type > 
             
          < location > /errors/exception.jsp </ location > 
           
          </ error-page > 
           
            
          < jsp-config > 
           
          < jsp-config > 元素內(nèi)嵌有處理JSP配置的大多數(shù)元素, 在一個(gè)部署描述文件中只能使用一個(gè)此類元素.
           
          < jsp-property-group > 
           
          < jsp-property-group > 元素為一組JSP頁(yè)面定義了一個(gè)屬性. 這組頁(yè)面由一個(gè)或多個(gè) < url-pattern > 元素定義.
           
          < jsp-config > 
             
          < jsp-property-group > 
               
          < url-pattern > *.xml </ url-pattern > 
               
          < el-ignored > true </ el-ignored > 
               
          < page-encoding > Shift_JTS </ page-encode > 
               
          < scripting-invalid > true </ scripting-invalid > 
             
          < jsp-propery-group > 
           
          </ jsp-config > 
           
           
           
          < resource-env-ref > 
           
          < resource-env-ref > 元素聲明了通過JNDI可訪問的應(yīng)用資源.
           
          < resource-env-ref > 
             
          < resource-env-ref-name > /jms/StockQueue </ resource-env-ref-name > 
             
          < resource-env-ref-type > /javax.jms.Queue </ resource-env-ref-type > 
           
          < resource-env-ref > 
           
           
          < resource-ref > 
           
          < resource-ref > 元素為應(yīng)用對(duì)象定義了JNDI可訪問對(duì)象工廠.

           
          < resource-ref > 
             
          < res-ref-name > /jms/Production </ res-ref-name > 
             
          < res-ref-type > /javax.sql.DataSource </ res-ref-type > 
             
          < res-auth > Container </ res-auth > 
           
          </ resource-ref > 
           
           
          < security-constraint > 
           
          < security-constraint > 元素定義了如何訪問資源以及由誰(shuí)訪問資源.

           
          < login-config > 
           
          < login-config > 元素聲明了對(duì)於受保護(hù)資源使用何種鑒別方法.在一個(gè)部署描述文件中只能使用一個(gè)此類元素.
           
          < login-config > 
             
          < auth-method > FORM </ auth-method > 
             
          < form-login-config > 
               
          < form-login-page > /login/login.html </ form-login-page > 
               
          < form-error-page > /login/error.html </ form-error-page > 
             
          </ form-login-config > 
           
          </ login-config > 
           
           
          < security-role > 
           
          < security-role > 元素用於定義應(yīng)用所用的角色名.
           
          < security-role > 
             
          < role-name > admin </ role-name > 
           
          </ security-role > 
           
          < security-role > 
             
          < role-name > user </ role-name > 
           
          </ security-role > 
           
           
           
          < locale-encoding-mapping-list > 
           
          < locale-encoding-mapping-list > 元素定義了本地化環(huán)境和響應(yīng)編碼之間的映射, 如果使用了多個(gè)此類元素, 

          容器會(huì)將其合並.
           
          < locale-encoding-mapping-list > 
             
          < locale-encoding-mapping > 
               
          < locale > locale </ locale > 
               
          < encoding > encoding </ encoding > 
             
          </ locale-encoding-mapping > 
           
          </ locale-encoding-mapping-list > 
           
           
           
          < env-entry > 
           
          < env-entry > 元素用於定義可由應(yīng)用通過JNDI訪問的簡(jiǎn)單對(duì)象, 如String 或 Boolean.
           
          < env-entry > 
             
          < env-entry-name > maxConnection </ env-entry-name > 
             
          < env-entry-type > java.lang.Integer </ env-entry-type > 
             
          < env-entry-value > 100 </ env-entry-value > 
           
          </ env-entry > 
           
           
          < ejb-ref > 
           
          < ejb-ref > 元素通常用於聲明應(yīng)用所用的一個(gè)遠(yuǎn)程EJB引用.
           
          < ejb-ref > 
             
          < ejb-ref-name > ejb/Payroll </ ejb-ref-name > 
             
          < ejb-ref-type > Session </ ejb-ref-type > 
             
          < home > com.mycomp.PayrollHome </ home > 
             
          < remote > com.mycomp.Payroll </ remote > 
           
          </ ejb-ref > 
           
           
          < ejb-local-ref > 
           
          < ejb-local-ref > 元素通常用於聲明應(yīng)用所用的一個(gè)本地EJB引用.
           
          < ejb-local-ref > 
             
          < ejb-ref-home > ejb/Payroll </ ejb-ref-name > 
             
          < ejb-ref-type > Session </ ejb-ref-type > 
             
          < local-home > com.mycomp.PayrollHome </ local-home > 
             
          < local > com.mycomp.Payroll </ local > 
           
          </ ejb-local-ref > 
           
           
          < service-ref > 
           
          < service-ref > 元素用於聲明應(yīng)用所用Web服務(wù)的一個(gè)引用.

           
          < message-destination-ref > 
           
          < message-destination-ref > 元素用於聲明應(yīng)用所用的JMS消息和目標(biāo)引用.

           
          < message-destination > 
           
          < message-destination > 元素可為應(yīng)用所用的一個(gè)JMS消息目標(biāo)聲明一個(gè)邏輯名.






          posted on 2008-10-31 12:38 xyz 閱讀(1223) 評(píng)論(0)  編輯  收藏 所屬分類: 網(wǎng)絡(luò)文摘

          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          留言簿

          隨筆檔案(1)

          文章分類(44)

          文章檔案(46)

          收藏夾(1)

          Adobe

          AOP

          API

          appServer

          BI

          c

          • c-free
          • codeblocks
          • codelite
          • CodeLite IDE 是一個(gè)強(qiáng)大的開源,跨平臺(tái)的 C/C++整合開發(fā)環(huán)境. 支持包括 Windows、Linux 和 Mac 系統(tǒng)下運(yùn)行
          • codelite官網(wǎng)
          • dev-c++
          • Dev-C++是一個(gè)C&C++開發(fā)工具,它是一款自由軟件,遵守GPL協(xié)議。
          • GCC
          • GCC 原名為 GNU C 語(yǔ)言編譯器(GNU C Compiler),因?yàn)樗局荒芴幚?C語(yǔ)言。GCC 很快地?cái)U(kuò)展,變得可處理 C++。之后也變得可處理 Fortran、Pascal、Objective-C、Java, 以及 Ada 與其他語(yǔ)言。

          Cache

          CMS

          DB

          eclipse

          FreeMarker

          hibernate

          html5

          ibatis

          java

          jquery

          js

          json

          Linux

          Log

          mail server

          mobile

          mysql

          oauth

          openID

          other

          PHP

          portal

          report

          Scheduler

          schema

          Security

          SOA

          spring

          struts

          UI原型設(shè)計(jì)

          w3c

          Wap

          webservice

          xml

          供應(yīng)鏈管理

          博客鏈接

          好網(wǎng)站

          工作流

          開源網(wǎng)

          招聘

          插件下載

          操作系統(tǒng)

          構(gòu)建可伸縮的系統(tǒng)

          構(gòu)建工具

          測(cè)試

          • IETest
          • IE官網(wǎng)
          • OpenSTA
          • Siege
          • Siege是一個(gè)壓力測(cè)試和評(píng)測(cè)工具,設(shè)計(jì)用于WEB開發(fā)這評(píng)估應(yīng)用在壓力下的承受能力

          游戲

          源碼托管

          經(jīng)營(yíng)

          資源

          金融/財(cái)務(wù)

          搜索

          •  

          最新評(píng)論

          主站蜘蛛池模板: 凭祥市| 苏尼特右旗| 根河市| 科技| 平昌县| 小金县| 尖扎县| 龙岩市| 额尔古纳市| 平安县| 乐安县| 乐东| 来宾市| 嘉峪关市| 余干县| 大姚县| 佛学| 澳门| 四子王旗| 竹北市| 鄂尔多斯市| 阿尔山市| 曲麻莱县| 东方市| 昌邑市| 达尔| 兴业县| 松江区| 鹤峰县| 根河市| 荔波县| 杭锦后旗| 马山县| 扶风县| 大庆市| 阳朔县| 长寿区| 贞丰县| 永和县| 连云港市| 石首市|