GeeCON Prague 2014*
The moose likes Servlets and the fly likes get HTML code ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "get HTML code ???" Watch "get HTML code ???" New topic
Author

get HTML code ???

marko stone
Greenhorn

Joined: Oct 16, 2002
Posts: 23
hello
how i can get in servlet html code, which was generated in another servlet ?
thanks
Christopher Dixon
Greenhorn

Joined: Jan 30, 2002
Posts: 22
If you just want to include it in a page the servlet is generating, look at Request.getRequestDispatcher(String).include()
To capture the code, either wrap the Request in a proxy that writes to your own Writer or OutputStream, or look at servlet filtering.
If you're trying to screen scrape, there are lots of packages out there to do it (check out Struts), or you can open a java.net.URL and do it the hard way.
Google is the Oracle. Ask and ye shall receive.
Chris
[ October 28, 2002: Message edited by: Christopher Dixon ]
 
GeeCON Prague 2014
 
subject: get HTML code ???