Please help me out in solving below problem. I have a jsp page which runs on apache with tomcat. In this page I have around 20 text boxes of which some are editable, values for this text boxes will come from an xml document not from the database. Now the problem is, when the user edits valus in text boxes and submits it. The updated values should get updated in xml document automatically. Please let me know how can I do this, If you have any code examples please let me know. It is very urgent Thank you in advance
*First at all, be familiar with good design, and learn the MVC model pattern (have a look to another thread, I'he put some links somewhere in a post) 1*In the controler , U will have to populate a model java bean with all the text fields contents. 2* You have 2 choices : simply make some System.out.println("<field num='1'>"+request.getParameter("HTMLfield")+"</field>"); * Or use DOM or lightier JDOM to create an Object graph and dump it into XML the best solutions will be using Java API for XML/Java Binding (JAXB) but it will be available in JDK1.4. have a look to http://java.sun.com/xml
---------<BR>Guillaume
Guillaume Compagnon
Ranch Hand
Joined: Aug 09, 2001
Posts: 106
posted
0
if U want to use JDOM , have a look to http://www.jdom.org You ve got the book written by Brett Mc Laughin , the founder of JDOM , published by O'Reilly and called Java & XML
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Originally posted by Guillaume Compagnon: *First at all, be familiar with good design, and learn the MVC model pattern (have a look to another thread, I'he put some links somewhere in a post) 1*In the controler , U will have to populate a model java bean with all the text fields contents. 2* You have 2 choices : simply make some System.out.println("<field num='1'>"+request.getParameter("HTMLfield")+"</field>"); * Or use DOM or lightier JDOM to create an Object graph and dump it into XML the best solutions will be using Java API for XML/Java Binding (JAXB) but it will be available in JDK1.4. have a look to http://java.sun.com/xml
Can I use MS-DOM parser instead of Jdom
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.