WEB.xml,server.xml,config.xml??????

Reply

Join Date: Jun 2008
Posts: 14
Reputation: shobhit123 is an unknown quantity at this point 
Solved Threads: 1
shobhit123 shobhit123 is offline Offline
Newbie Poster

WEB.xml,server.xml,config.xml??????

 
0
  #1
Jun 13th, 2008
I am very new to web development.i have heard about xmls in web deployment.Pls explain me why so mainy xmls like server.xml,config.xml,web.xml,context.xml are required.can not we combine them together in one.Why do we need them at first place.Do web servers contain parsers in them to parse xmls.Pls explain whole mechanism or provide some link to understand it.
Thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,205
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 486
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: WEB.xml,server.xml,config.xml??????

 
-1
  #2
Jun 15th, 2008
>Why do we need them at first place.
It is better solution as you can jump to requered element of the document faster then with conventional text files that have to be first read and only after that searched. It is realy the structure of the file
  1. <config>
  2. <parameter_1>
  3. <variable_1>
  4. <value>true</value>
  5. </variable_1>
  6. <variable_2>
  7. <value>false</value>
  8. </variable_2>
  9. <variable_3>
  10. <value>true</value>
  11. </variable_3>
  12. </parameter_1>
  13. <parameter_2>
  14. <variable_1>
  15. <value>false</value>
  16. </variable_1>
  17. <variable_2>
  18. <value>true</value>
  19. </variable_2>
  20. <variable_3>
  21. <value>false</value>
  22. </variable_3>
  23. </parameter_2>
  24. <parameter_3>
  25. <variable_1>
  26. <value>false</value>
  27. </variable_1>
  28. <variable_2>
  29. <value>true</value>
  30. </variable_2>
  31. <variable_3>
  32. <value>true</value>
  33. </variable_3>
  34. </parameter_3>
  35. </config>
I order to find value of variable_2 of parameter_3 application will check for the child parameter_3 of config parent. It will reject any other chiles till it reach the one is looking or find none(this will result in error if not taken care of). Same process will repeat with variable_2 of parameter_3. This mean that application doesn't have to visit each child/node of the XML tree, therefore it become faster.

>why so mainy xmls
If you put everything in one document it will take time to read it, perfect example is WURFL xml that hold data on various mobile phone dating few years back and still adding new. Idea was great but right now (or last I try to check on file) it is/was nearly 7MB in size, which is far to much. Secondly most of the above mentioned files are server configuration files that are related to various categories of functionality which are easier to manage/edit in smaller sizes then with thousands of lines. What do you think, how quickly you find error in file with some 130 lines where most of it are notes/comments in comparing to 2500 lines?

>Do web servers contain parsers in them to parse xmls.Pls explain whole mechanism or provide some link to understand it.

Yes, they do have parsers which are generaly same. To more understand XML you may want to have look at w3schools tutorials on this topic
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 14
Reputation: shobhit123 is an unknown quantity at this point 
Solved Threads: 1
shobhit123 shobhit123 is offline Offline
Newbie Poster

Re: WEB.xml,server.xml,config.xml??????

 
0
  #3
Jun 15th, 2008
Ya i have understood it...
thanks for replying peter....
will ask some more as i read more...

shobhit
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC