Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Related to DTD of a document

 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what happens if we don't specify any dtd for our web.xml ?

I didn't found it mantadatory , but the IDE genertaes this.

What are the pros and cons if i ignore or keep it .

Thanks in advance .
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Delete it, deploy the app, start the server and see what happens.
 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its working .as i already mentioned it "I didn't found it mantadatory , but the IDE genertaes this."
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without it, the container has no way of knowing what version and format you intend to use and just makes a guess.

Not the best of ideas.

 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear ,


Guess ??

Can you please ellobrate little bit on this .
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without any info on which servlet version the deployment descriptor is targeted, the container can only guess. It will usually guess that you are specifying the latest version that the container supports, but that may not be correct, and probably won't be if you upgrade the container or move the app to a different container.

It's best to be explicit.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, in many containers, the EL may not be enabled in JSPs unless you specify the proper Schema version of the deployment descriptor.
 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic