my dog learned polymorphism*
The moose likes Servlets and the fly likes servlet and xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet and xml" Watch "servlet and xml" New topic
Author

servlet and xml

Sruthi Sen
Greenhorn

Joined: Dec 20, 2005
Posts: 22
hi all

Can i send data from one servlet to other in an xml format and receive data in the same format?

is it possible?

thank u.
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by kee ch:
hi all

Can i send data from one servlet to other in an xml format and receive data in the same format?

is it possible?

thank u.



You can always convert XML into Document object(DOM) and probably reverse also....

And then you can set this Document object into request attribute and forward request to some other servlet/JSP...

Hope it is right way...


[ December 27, 2005: Message edited by: rathi ji ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

XBeans ?

Use Xbeans to process your XML as DOM Documents


[My Blog]
All roads lead to JavaRanch
Sruthi Sen
Greenhorn

Joined: Dec 20, 2005
Posts: 22
but how to create DOM object?

can i have sample code of sender and reciever servlet?

thanks a lot
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Take a look at JDOM


JDOM Article


JDOM Home Page


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Hello,
If you are talking about passing XML across Process boundary then XBean will be a solution otherwise a simple file handle/DOM Tree will do the job within a single web app.
Shrinivas
 
wood burning stoves
 
subject: servlet and xml
 
Similar Threads
How to save html form into a xml file?
regarding xml and .gif
Question to Sas Jacobs
Dynamic Drop down menu
Help Needed Here EJB!!