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

           
          < 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容器: 應用設計為在分布式Web容器中運行.此元素不含體.

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

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

           
          < 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 > 元素, 可以將過濾器映射至一個URI模式, 或者映射至一個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 > 用於注冊一個監(jiān)聽組件.

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

          關聯(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 > 子元素可以告訴容器在應用開始時加載Servlet.這個值是一個正整數(shù), 指示了Servlet相對於

          其它Servlet的加載時間.此值較小的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 > 元素將一個Servlet或JSP頁面映射至一個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 > 
          擴展名映射模式:
           
          < servlet-mapping > 
             
          < servlet-name > XMLProcessor </ servlet-name > 
             
          < url-pattern > *.xml </ url-pattern > 
           
          </ servlet-mapping > 
           
           
          < session-config > 
           
          < session-config > 元素可以定制會話處理屬性.在一個部署描述文件中只能使用一個此類元素.

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

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

          其合並.

           
          < 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 > 元素可以定義向用戶告知各種錯誤的頁面.

           
          < 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 > 元素內嵌有處理JSP配置的大多數(shù)元素, 在一個部署描述文件中只能使用一個此類元素.
           
          < jsp-property-group > 
           
          < jsp-property-group > 元素為一組JSP頁面定義了一個屬性. 這組頁面由一個或多個 < 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可訪問的應用資源.
           
          < 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 > 元素為應用對象定義了JNDI可訪問對象工廠.

           
          < 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 > 元素定義了如何訪問資源以及由誰訪問資源.

           
          < login-config > 
           
          < login-config > 元素聲明了對於受保護資源使用何種鑒別方法.在一個部署描述文件中只能使用一個此類元素.
           
          < 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 > 元素用於定義應用所用的角色名.
           
          < 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)境和響應編碼之間的映射, 如果使用了多個此類元素, 

          容器會將其合並.
           
          < locale-encoding-mapping-list > 
             
          < locale-encoding-mapping > 
               
          < locale > locale </ locale > 
               
          < encoding > encoding </ encoding > 
             
          </ locale-encoding-mapping > 
           
          </ locale-encoding-mapping-list > 
           
           
           
          < env-entry > 
           
          < env-entry > 元素用於定義可由應用通過JNDI訪問的簡單對象, 如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 > 元素通常用於聲明應用所用的一個遠程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 > 元素通常用於聲明應用所用的一個本地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 > 元素用於聲明應用所用Web服務的一個引用.

           
          < message-destination-ref > 
           
          < message-destination-ref > 元素用於聲明應用所用的JMS消息和目標引用.

           
          < message-destination > 
           
          < message-destination > 元素可為應用所用的一個JMS消息目標聲明一個邏輯名.






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

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

          留言簿

          隨筆檔案(1)

          文章分類(44)

          文章檔案(46)

          收藏夾(1)

          Adobe

          AOP

          API

          appServer

          BI

          c

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

          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原型設計

          w3c

          Wap

          webservice

          xml

          供應鏈管理

          博客鏈接

          好網(wǎng)站

          工作流

          開源網(wǎng)

          招聘

          插件下載

          操作系統(tǒng)

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

          構建工具

          測試

          游戲

          源碼托管

          經(jīng)營

          資源

          金融/財務

          搜索

          •  

          最新評論

          主站蜘蛛池模板: 屏南县| 固阳县| 崇左市| 乌兰浩特市| 上高县| 阿图什市| 德保县| 伊宁县| 彝良县| 东城区| 胶州市| 赣州市| 德保县| 江达县| 灵山县| 高台县| 白沙| 固原市| 集安市| 涟水县| 鄂托克前旗| 邵阳县| 安吉县| 西藏| 遂宁市| 三明市| 克拉玛依市| 灌阳县| 邢台县| 九龙县| 明溪县| 尼玛县| 嘉荫县| 株洲县| 洛川县| 凉山| 大城县| 德庆县| 特克斯县| 枣强县| 秦皇岛市|