aspose file tools
The moose likes Servlets and the fly likes why DD is in XML? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "why DD is in XML?" Watch "why DD is in XML?" New topic
Author

why DD is in XML?

srinivas rach
Greenhorn

Joined: May 24, 2011
Posts: 7

why deployment descriptor in xml file?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56233
    
  13

Why not?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
srinivas rach
Greenhorn

Joined: May 24, 2011
Posts: 7

need clarity....why xml only?why not others
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56233
    
  13

Such as? You'll need to put a little more effort into your question.
srinivas rach
Greenhorn

Joined: May 24, 2011
Posts: 7

thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56233
    
  13

For example: what other formats would you expect, and why?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

The answer is the same as the answer to all the other "why is it like that" questions I see around here: it's that way because the designers decided to do it that way.

Now perhaps you meant to ask why the designers decided to use XML. Or perhaps you meant to ask why XML might be a better choice than some other format. But those are very different questions and we shouldn't be made to guess what you meant by your question. So... if you have a specific question, please ask it.
srinivas rach
Greenhorn

Joined: May 24, 2011
Posts: 7

you are right paul....thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
Years ago when servlets first appeared I worked with a pioneering commercial version.

It used properties files to define parameters to the container - what a confusing mess.

Because of the limited ability of the property file concept of name/value pairs to communicate structure, we ended up with multiple files having confusing names containing properties with confusing names. Switching to web.xml was a big improvement.

Bill

Java Resources at www.wbrogden.com
Jesper de Jong
Java Cowboy
Bartender

Joined: Aug 16, 2005
Posts: 12929
    
    3

Comparing XML to *.properties files:

In my very first J2EE project, back in 2001, we used BEA WebLogic version 5.1. You had to configure it in one giant *.properties file. That was a big mess. In WebLogic 6.0, the configuration was done in XML, which was much more clear.

A *.properties file is just a flat list of key-value pairs. XML has hierarchical tree structure, so that you can organise things in a much better way.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: why DD is in XML?
 
Similar Threads
How to get Events associated with DOM elements ?
#{something} out of an attribute
Well Formed
Parsing a DOM object
XMLHTTPRequest Handling HTML Response