[jdom-interest] forwarding JDOM-Objects

frode at fritid.as frode at fritid.as
Fri Jan 6 14:37:31 PST 2006


Why don't you put it as an attribute to the servletcontext. Since both revlets runs in the same container, they both
have access to the same servlet-context, and can exchange objects there ?

the sending one :
Document o = new Document();

the recieving one :

Document o = (Document) this.getServletContext().getAttribute("jdom_object);

Frode Halvorsen

                      Christian Stalp                                                                                                                                    
                      <stalp at imbei.uni-ma        To:       jdom-interest at jdom.org                                                                                        
                      inz.de>                    cc:                                                                                                                     
                      Sent by:                   Subject:  [jdom-interest] forwarding JDOM-Objects                                                                       
                      es at jdom.org                                                                                                                                        
                      06.01.2006 18:53                                                                                                                                   

Hello out there,
I have a special problem. I wrote this allready into the tomcat user
list, but maybe somone here has a good solution for my problem.
I want to forward a JDOM-object from one servlet to another in the same
servlet-container. I thought I write this JDOM to a string, transfer it
and unpack it at the other side.

BUT I cannot find a way to extract a JDOM from a String delivered by a
I tried it this way:
String mystring = req.getParameter("Objekt");
       Document mydoc = mystring.?  <- no method found
I thought there was a method anyway. What can I do here?

Thank you and...

Gruss Christian

To control your jdom-interest membership:

More information about the jdom-interest mailing list