This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes Related to DTD of a document Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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.


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
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: 56185
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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: 56185
    
  13

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: 56185
    
  13

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
 
Similar Threads
ejb-jar.xml doctype reference for local DTD reference
Xerces-2 Parsing to DOM and default attributes question
latest webapps dtd
Taking DTD from Classpath
XSD & DTD ?