File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes web-app element in DD doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "web-app element in DD doubt" Watch "web-app element in DD doubt" New topic

web-app element in DD doubt

Rancy Chadha
Ranch Hand

Joined: Jul 12, 2006
Posts: 135
Hi All,

Can anyone make it clear to me if attributes namely xmlns, xsi, schemaLocation and version of 'web-app' element in web.xml(DD) are necessary to be specified? According to servlet spec 2.4 SRV 13.4 "web-app element has a required attribute version to specify which version of the schema the deployment descriptor conforms".
I tried to make a web app without specifing any of these attributes of web-app element in DD and my application works absolutely fine. This lead to confusion about the statement mentioned above given in servlet specs.
Please help me with this.


Thanks,<br />-Rancy
Naren Dhande

Joined: Oct 09, 2006
Posts: 1

Most of the times you have to cut,paste the web-app entry provided for the version. The version attribute is mandatory for the Servlet version 2.4. But the web containers like tomcat does not check strictly the xml schema of the DD.

But if you try to deploy application on other app servers like Sun Java Application server. It validate the DD against schema definition and throw error at deployment time.

Hope this help.

Rancy Chadha
Ranch Hand

Joined: Jul 12, 2006
Posts: 135
Yes Naren your reply was helpful. Thanks!

I agree. Here's the link:
subject: web-app element in DD doubt
It's not a secret anymore!