AKAI TSUKI

System development or Technical something

2007-05-02から1日間の記事一覧

Tomcat Basic認証

ひとまず認証の勉強にTomcatのBasicについて試してみる。 が、 よくわからん。 . . . . . . . . . orz 以下の3つのファイルを書き換えたら動いたけど 正しいのか怪しいもんだわ。 コンテキスト.xml web.xml tomcat-users.xml にそれぞれ、 コンテキスト.xml <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase" /></realm>…

Tomcat Form認証

さて、次にForm認証を試してみる。 こちらは、Basic認証をやった後のおかげか さくっと出来た。Basicとの差分は コンテキスト.xml 変更なし。Realmの設定だけなので、認証方法の変更では修正する必要がない。 web.xml <security-constraint> <web-resource-collection> <web-resource-name> Authentication of Form Auth </web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> </security-constraint>