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

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

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

 deployment descriptorの記述形式はXML形式(XMLスキーマベース)です。deployment descriptorの記述形式を以下に示します。

------------------------------------------------------------------------------------
  <?xml version="1.0" encoding="UTF-8" ?>
  <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">
    <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>
      <dispatcher>value</dispatcher>
    </filter-mapping>
    <filter-mapping>
      <filter-name>value</filter-name>
      <url-pattern>pattern</url-pattern>
      <dispatcher>value</dispatcher>
    </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>
    <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-type>entry-type</env-entry-type>
      <env-entry-value>entry-value</env-entry-value>
    </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>
    <message-destination-ref>
      <description>description</description>
      <message-destination-ref-name>name</message-destination-ref-name>
      <message-destination-type>type</message-destination-type>
      <message-destination-usage>usage</message-destination-usage>
      <message-destination-link>link</message-destination-link>
    </message-destination-ref>
    <message-destination>
      <description>description</description>
      <message-destination-name>name</message-destination-name>
    </message-destination>
    <service-ref>
      <service-ref-name>name</service-ref-name>
      <service-interface>interface</service-interface>
      <wsdl-file>file</wsdl-file>
      <jaxrpc-mapping-file>file</jaxrpc-mapping-file>
    </service-ref>
    <locale-encoding-mapping-list>
      <locale-encoding-mapping>
        <locale>locale</locale>
        <encoding>encoding</encoding>
      </locale-encoding-mapping>
    </locale-encoding-mapping-list>
    <jsp-config>
      <taglib>
        <taglib-uri>uri</taglib-uri>
        <taglib-location>location</taglib-location>
      </taglib>
      <jsp-property-group>
        <url-pattern>pattern</url-pattern>
        <el-ignored>true または false</el-ignored>
        <page-encoding>value</page-encoding>
        <scripting-invalid>true または false</scripting-invalid>
        <is-xml>true または false</is-xml>
        <include-prelude>uri</include-prelude>
        <include-coda>uri</include-coda>
      </jsp-property-group>
    </jsp-config>
  </web-app>
------------------------------------------------------------------------------------

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


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

Copyright 2008 FUJITSU LIMITED