Java SJC-WC試験対策資料 付録。


<?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">

</web-app>


description * †

  1. このWebアプリの説明
  2. 複数可
  3. xml:lang 属性を付加可能。デフォルト値は xml:lang="en" (English)

display-name * †

  1. このWebアプリの説明
  2. 複数可
  3. xml:lang 属性を付加可能。デフォルト値は xml:lang="en" (English)

icon * †

  1. GUIツールで表示するためのアイコン名
  2. GIFかJPEG

small-icon ? †

large-icon ? †

distributable * †

  1. このプログラムが動くJ2EEコンテナを列挙

context-param * †

  1. ServletContext#getInitParamter("Webmaster")でここで定義した値を取得できる

description * †

param-name ◇ †

param-value ◇ †

filter * †

  1. ここではfilterを構成するクラスの定義
  2. filter-mappingでURLと関連づけ
    <filter>
      <filter-name>CharsetEncodingFilter</filter-name>
      <filter-class>com.foo.CharsetEncodingFilter</filter-class>
      <init-param>
        <param-name>charset</param-name>
        <param-value>Shift_JIS</param-value>
      </init-param>
    </filter>

description * †

display-name * †

icon * †

filter-name ◇ †

filter-class ◇ †

init-param * †

description * †

param-name ◇ †

param-value ◇ †

filter-mapping * †

  1. ここではfilterを適用するURLの定義
  2. filterでフィルタ処理を行うクラスと関連づけ
    <filter-mapping>
      <filter-name>CharsetEncodingFilter</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>

filter-name ◇ †

url-pattern or servlet-name ◇ †

dispatcher 0…4 †

listener * †

description * †

display-name * †

icon * †

listener-class †

servlet * †

description * †

display-name * †

icon * †

servlet-name ◇ †

servlet-class or jsp-file ◇ †

init-param * †

description * †

param-name †

param-value †

load-on-startup ? †

run-as ? †

security-role-ref * †

description * †

role-name ◇ †

role-link ? †

servlet-mapping * †

servlet-name ◇ †

url-pattern ◇ †

session-config * †

session-timeout ? †

mime-mapping * †

extension †

mime-type †

welcome-file-list * †

welcome-file + †

error-page * †

error-code or exception-type ◇ †

location ◇ †

jsp-config * †

taglib * †

  1. JSP中のtaglib宣言で使用するURIと、実際のtldファイルを結びつけるモノ
    • JSP
      <%@ taglib uri="http://hondou.homedns.org/tags/snail.tld" prefix="snail"%>
    • web.xml
      <taglib>
         <taglib-uri>/http://hondou.homedns.org/tags/snail.tld</taglib-uri>
         <taglib-location>/WEB-INF/snail.tld</taglib-location>
      </taglib>
    • snail.tld
      tab定義 (cf.[[クラッシックタグハンドラ>Java SJC-WC#classicTag]]

taglib-uri †

taglib-location or taglib-uri ◇ †

jsp-property-group * †

descirption * †

display-name * †

icon * †

url-pattern * †

el-ignored * †

page-encoding * †

scriptiong-invalid * †

is-xml * †

include-prelude * †

include-coda * †

security-constraint * †

display-name * †

web-resource-collection + †

web-resource-name †

description * †

url-pattern + †

http-method * †

auth-constraint ? †

description * †

role-name * †

user-data-constraint ? †

description * †

transport-guarantee †

login-config * †

auth-method ? †

設定値認証方法説明
BASICBASIC認証ブラウザから認証ダイアログが立ち上がる
DIGESTDIGEST認証BASIC認証を暗号化
FORMFORM認証HTMLを使って認証を行う
CLIENT_CERTSSLを確立https通信を確立する。J2EEコンテナ固有の設定と、クライアントへの証明書の配布が必要

realm-name ? †

form-login-config ? †

form-login-page †

form-error-page †

  1. login.jspで、認証に失敗したときに呼ばれる。
  2. このJSPは、ダイアログを表示して、元の画面(ログインしようとしたURL)に戻ろうとする。
  3. ところが、認証が済んでいないので、元の画面(ログインしようとしたURL)を表示する前にlogin.jspが表示される。
  4. 実装はトリッキーだが、ユーザから見ると自然な画面遷移。
    • ログイン画面で認証失敗のダイアログが表示されたように見える。
    • ユーザ名・パスワードを入力し直すと、最初に表示しようとしたURLにきちんと遷移する。

security-role * †

description * †

role-name ◇ †

env-entry * †

description * †

env-entry-name †

env-entry-type †

env-entry-value ? †

ejb-ref * †

description * †

ejb-ref-name †

ejb-ref-type †

home †

remote †

ejb-link ? †

ejb-local-ref * †

description * †

ejb-ref-name †

ejb-ref-type †

local-home †

local †

ejb-link ? †

service-ref * †

description * †

display-name * †

icon * †

service-ref-name †

service-interface †

wsdl-file ? †

jaxrpc-mapping-file ? †

service-qname ? †

port-component-ref * †

handler * †

resource-ref * †

description * †

res-ref-name †

res-type †

res-auth †

res-sharing-scope ? †

resource-env-ref * †

description * †

resource-env-ref-name †

resource-env-ref-type †

message-destination-ref * †

description †

message-destination-ref-name ◇ †

message-destination-ref-type * †

message-destination-ref-usage ◇ †

message-destination-link ? †

message-destination * †

description * †

display-name * †

icon * †

message-destination-name ◇ †

local-encoding-mapping-list * †

local-encoding-mapping + †

locale ◇ †

encoding ◇ †


Java


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2007-01-21 (日) 18:34:29 (7242d)
Short-URL: https://pukiwiki.at-sushi.com/pukiwiki/?cmd=s&k=ba6e1e75e8
ISBN10
ISBN13
9784061426061