[jdom-interest] Order of tags

Jason Hunter jhunter at acm.org
Mon Oct 1 23:12:28 PDT 2001


There's a FAQ answer about how to control the placement of elements. 
Short answer is use the List interface on the List of children.

-jh-

The Duke wrote:
> 
> I am building an application that can create servlets for webapplications in Tomcat 4.0. The servlets are defined in WEB-INF/web.xml. The problem is the way the tags are placed. You only can place them like this :
> 
> <servlet>
> </servlet>
> 
> <servlet>
> </servlet>
> 
> <servlet-mapping>
> </servlet-mapping>
> 
> <servlet-mapping>
> </servlet-mapping>
> 
> When I add a servlet with Jdom it will place both new tags at the end. Before the </web-app>. When I restart the tomcat server it will generate an error. On my system I do not have acces to the internet so I have downloaded the file and included the dtd with : http://localhost:8080/Dtd/web-app_2_3.dtd.
> 
> I've tried to fix the problem with a different order of addContent(Element anElement) but that did not work.
> 
> Can any one help??
> 
> Make a difference, help support the relief efforts in the U.S.
> http://clubs.lycos.com/live/events/september11.asp
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list