次のように、J2EEWebアプリバージョン2.4準拠のweb.xmlの要素に複数の要素を含めてもかまいません。
<filter-mapping>
<filter-name>SomeFilter</filter-name>
<url-pattern>*.htm</url-pattern>
<url-pattern>*.do</url-pattern>
</filter-mapping>
ここからXSD「web-app_2_4.xsd」ファイルを検索しました:http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd 定義は次のようになります。
<xsd:complexType name="filter-mappingType">
<xsd:annotation>
<xsd:documentation>
some documentation here
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="filter-name"
type="j2ee:filter-nameType"/>
<xsd:choice>
<xsd:element name="url-pattern"
type="j2ee:url-patternType"/>
<xsd:element name="servlet-name"
type="j2ee:servlet-nameType"/>
</xsd:choice>
<xsd:element name="dispatcher"
type="j2ee:dispatcherType"
minOccurs="0" maxOccurs="4"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
URLパターンの定義は次のようになります。
したがって、要素には複数の要素を含めることができると思います。しかし、私のEclipse IDEは私に同意していないようで、「ディスパッチャー」タグを期待しています。
画像を参照してください: