This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSP and the fly likes Can and How do you pass a Document Object from servlet to a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Can and How do you pass a Document Object from servlet to a JSP" Watch "Can and How do you pass a Document Object from servlet to a JSP" New topic
Author

Can and How do you pass a Document Object from servlet to a JSP

Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
I need to pass a Document Object from servlet to JSP:
I basically parse the input Stream into a doc such as::
InputStream in = urlConn.getInputStream();
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
DocumentBuilder db=dbf.newDocumentBuilder();
Document doc = db.parse(in);
System.out.println("my doc "+ doc.toString()); // this gives me null???any ideas why?
I need to pass doc to template.jsp and to process the doc on the template.jsp
Thanks in advance


------------------
Sun Certified Java Programmer
Sun Certified Java Developer
I-Net Certified
A+ Certified
Network+ Certified
MCP


SCJO, SCJD, SCWCD, I-Net+, A+, Network+, MCSD, MCDBA, MCP, MCT
David Kane
Ranch Hand

Joined: Sep 20, 2001
Posts: 65
I posted an answer to this in the XML forum.
Dave
------------------
David Kane
david_kane@houseofyin.com
Author of Software Architecture: Organizational Principles and Patterns
http://www.vraps.com
http://www.houseofyin.com


David Kane<BR> <A HREF="mailto:david_kane@houseofyin.com" rel="nofollow">david_kane@houseofyin.com</A> <BR>Author of <A HREF="http://www.amazon.com/exec/obidos/ASIN/0130290327/ref=ase_electricporkchop/103-0514572-3811868" TARGET=_blank rel="nofollow">Software Architecture: Organizational Principles and Patterns</A><BR><A HREF="http://www.vraps.com" TARGET=_blank rel="nofollow">http://www.vraps.com</A><BR><A HREF="http://www.houseofyin.com" TARGET=_blank rel="nofollow">http://www.houseofyin.com</A>
Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
Thanks when I get back on that project I will try this code.

Thanks
Ray Smilgius
------------------
Sun Certified Java Programmer
Sun Certified Java Developer
I-Net Certified
A+ Certified
Network+ Certified
MCP
 
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.
 
subject: Can and How do you pass a Document Object from servlet to a JSP
 
Similar Threads
need to get response xml string back from servlet to jsp page
Passing Document from servlet to JSP see code
trouble passing info from servlet to jsp
How to pass a parsed XML Document object from servlet to JSP??
Can I load a xml string versus reading a file