Interstage Application Server J2EE ユーザーズガイド
目次 索引 前ページ次ページ

第2部 Servlet/JSP編> 第7章 Webアプリケーションの開発> 7.5 Webアプリケーション環境定義ファイル(deployment descriptor)

7.5.1 Webアプリケーション環境定義ファイル(deployment descriptor)の記述形式

 deployment descriptorの記述形式はXML形式です。deployment descriptorの記述形式を以下に示します。

------------------------------------------------------------------------------------
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE web-app PUBLIC 
  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 
  "http://java.sun.com/dtd/web-app_2_3.dtd">
  <web-app>
    <display-name>display_name</display-name>
    <context-param>
      <param-name>name</param-name>
      <param-value>value</param-value>
    </context-param>
    <filter>
      <filter-name>name</filter-name>
      <filter-class>class</filter-class>
      <init-param>
        <param-name>name</param-name>
        <param-value>value</param-value>
      </init-param>
    </filter>
    <filter-mapping>
      <filter-name>value</filter-name>
      <servlet-name>name</servlet-name>
    </filter-mapping>
    <filter-mapping>
      <filter-name>value</filter-name>
      <url-pattern>pattern</url-pattern>
    </filter-mapping>
    <listener>
      <listener-class>class</listener-class>
    </listener>
    <servlet>
      <servlet-name>name</servlet-name>
      <servlet-class>class</servlet-class> または <jsp-file>file-name</jsp-file>
      <init-param>
        <param-name>name</param-name>
        <param-value>value</param-value>
      </init-param>
      <load-on-startup>priority</load-on-startup>
      <security-role-ref>
        <role-name>name</role-name>
        <role-link>name</role-link>
      </security-role-ref>
    </servlet>
    <servlet-mapping>
      <servlet-name>name</servlet-name>
      <url-pattern>pattern</url-pattern>
    </servlet-mapping>
    <session-config>
      <session-timeout>time</session-timeout>
    </session-config>
    <mime-mapping>
      <extension>ext</extension>
      <mime-type>mime</mime-type>
    </mime-mapping>
    <welcome-file-list>
      <welcome-file>filename</welcome-file>
    </welcome-file-list>
    <error-page>
      <error-code>code</error-code> または <exception-type>type</exception-type>
      <location>resource</location>
    </error-page>
    <taglib>
      <taglib-uri>uri</taglib-uri>
      <taglib-location>location</taglib-location>
    </taglib>
    <resource-env-ref>
      <resource-env-ref-name>env-ref-name</resource-env-ref-name>
      <resource-env-ref-type>type</resource-env-ref-type>
    </resource-env-ref>
    <resource-ref>
      <res-ref-name>ref-name</res-ref-name>
      <res-type>type</res-type>
      <res-auth>signon</res-auth>
    </resource-ref>
    <security-constraint>
      <web-resource-collection>
        <web-resource-name>resource-name</web-resource-name>
        <url-pattern>pattern</url-pattern>
        <http-method>method</http-method>
      </web-resource-collection>
      <auth-constraint>
        <role-name>name</role-name>
      </auth-constraint>
      <user-data-constraint>
        <transport-guarantee>guarantee-type</transport-guarantee>
      </user-data-constraint>
    </security-constraint>
    <login-config>
      <auth-method>method</auth-method>
      <realm-name>name</realm-name>
      <form-login-config>
        <form-login-page>login-page</form-login-page>
        <form-error-page>error-page</form-error-page>
      </form-login-config>
    </login-config>
    <security-role>
      <role-name>name</role-name>
    </security-role>
    <env-entry>
      <env-entry-name>entry-name</env-entry-name>
      <env-entry-value>entry-value</env-entry-value>
      <env-entry-type>entry-type</env-entry-type>
    </env-entry>
    <ejb-ref>
      <ejb-ref-name>ref-name</ejb-ref-name>
      <ejb-ref-type>ref-type</ejb-ref-type>
      <home>ejb-home</home>
      <remote>ejb-remote</remote>
      <ejb-link>name</ejb-link>
    </ejb-ref>
    <ejb-local-ref>
      <description>description</description>
      <ejb-ref-name>name</ejb-ref-name>
      <ejb-ref-type>type</ejb-ref-type>
      <local-home>home</local-home>
      <local>remote</local>
      <ejb-link>link</ejb-link>
    </ejb-local-ref>
  </web-app>
------------------------------------------------------------------------------------

■記述にあたっての注意事項


目次 索引 前ページ次ページ

All Rights Reserved, Copyright(C) 富士通株式会社 2005