web.xmlのxsi:schemaLocation
- [Seasar-user:12909] sa-struts-tutorial の web.xmlについて
- SAStrutsのチュートリアルとブランクのweb.xmlの記述ミス - しんさんの出張所 はてな編
で指摘されているように、
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
ではなく
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
が正しいみたい。
- http://www.atmarkit.co.jp/fjava/javatips/037container004.html
- http://www.techscore.com/tech/J2EE/Servlet/13.html
には xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" とあるけど。^^);
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"とある場合にMayaaを使うと、
org.xml.sax.SAXParseException: SchemaLocation: schemaLocation value = 'http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd' must have even number of URI's.
とか
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'.
といわれるのは、MayaaがXercesを使ってweb.xmlを厳密に解析しているからでしょうね。
Mayaaを使わない場合、TomcatがXercesを使わずにちょろっと見ているだけなのでエラーにならないのでしょう。
というわけで、修正しました。http://svn.seasar.org/browse?view=rev&root=sastruts&revision=475
S2BlazeDSのチュートリアル、ドキュメントやDoltengが生成するSAStrutsの雛形も直したほうがよさそうですね。
えーと、上記2つはコミット権限が無いのでお願いします。m( )m > id:higayasuo さん