aspose file tools*
The moose likes Servlets and the fly likes Related to DTD of a document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Related to DTD of a document" Watch "Related to DTD of a document" New topic
Author

Related to DTD of a document

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212

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

Joined: Oct 08, 2006
Posts: 2458
Delete it, deploy the app, start the server and see what happens.
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Its working .as i already mentioned it "I didn't found it mantadatory , but the IDE genertaes this."
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Thanks Bear ,


Guess ??

Can you please ellobrate little bit on this .
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

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

Joined: Jan 10, 2002
Posts: 61662
    
  67

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

Joined: Feb 28, 2009
Posts: 212
Thank you Bear
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Related to DTD of a document