-
1. Re: exception filter not found as a child of web-app in unordered_sequence:
jaikiran Feb 14, 2011 4:30 AM (in response to iltrex)Try adding an xsd declaration in that web.xml as follows:
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <filter> <filter-name>ExpiresFilter</filter-name> <filter-class>com.cj.expire.ExpiresFilter</filter-class> <init-param> <param-name>expires</param-name> <!-- in seconds --> <param-value>60</param-value> </init-param> </filter> <filter-mapping> <filter-name>ExpiresFilter</filter-name> <url-pattern>*.html</url-pattern> </filter-mapping> </web-app>
-
2. Re: exception filter not found as a child of web-app in unordered_sequence:
iltrex Feb 14, 2011 5:21 AM (in response to jaikiran)good, this worked perfectly for the example web.xml file.
Now, I tried it on other applications, and I get a new error. Here exception and web.xml file...
thanks for help.
Deployment "vfs:///usr/java/jboss-6.0.0.Final/server/default/deploy/sa.war" is in error due to the following reason(s): org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'servlet-class'. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":servlet-name}' is expected. @ vfs:///usr/java/jboss-6.0.0.Final/server/default/deploy/sa.war/WEB-INF/web.xml[6,18]
the file is
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-class>com.xxx.DataGridRpcImpl
</servlet-class>
<servlet-name>DataGridRpc</servlet-name>
</servlet>
<servlet-mapping>
<servlet-name>DataGridRpc</servlet-name>
<url-pattern>/Application/DataGridRpc
</url-pattern>
</servlet-mapping>
-
3. Re: exception filter not found as a child of web-app in unordered_sequence:
iltrex Feb 14, 2011 5:46 AM (in response to iltrex)it seems that, if I invert servlet-class and servlet-name order, it works.
but I have tens of servlets and tens of web.xml files, I would like to avoid changing all of them.
Is there any xsd declaration that will make them work in any order ?