I think we get a compile time error by declaring <init-param> as a subelement of <servlet-mapping>. I am using eclipse and it gives me a error if I give <init-param> under <servlet-mapping> element.
Joined: Nov 05, 2004
IDEs like eclipse, netbeans can have schema validation enabled. Because init-param is not a part of servlet-mapping it schema validation fails and eclipse reports it as a error in the problems view. (one can disable the validations in the eclipse preferences)
Also, if you have XML-Validation turned on in the container(I am taking about Tomcat, I don't know how to do it in others) web application won't start/load. [ August 11, 2008: Message edited by: Ramesh Ponnada ]