• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David Kane
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic