Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web-app element in DD doubt

 
Rancy Chadha
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
-Rancy
 
Naren Dhande
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Thanks
 
Rancy Chadha
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Naren your reply was helpful. Thanks!

-Rancy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic