This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: get HTML code ???
 
Similar Threads
Very simple JSP with Scriplet
HTTP Status 404 - /HelloWorld
Servlets and browsers
Icefaces,JasperReport Integration
Loading HTML into a Servlet