aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet and xml
 
Similar Threads
Help Needed Here EJB!!
Dynamic Drop down menu
Question to Sas Jacobs
regarding xml and .gif
How to save html form into a xml file?