File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Editing the contents of the PrintWriter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Editing the contents of the PrintWriter" Watch "Editing the contents of the PrintWriter" New topic

Editing the contents of the PrintWriter

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230

I am in a situation as follows:

My servlet is calling a stored procedure that writes HTML. I want to extract values from that HTML and do further processing with them and I want to edit the HTML. So after I make the call, I want to parse the contents of response.getWriter(). I am assuming that the stored procedure output is accessible there.

I cannot figure out a way to do this. Any ideas?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

Sounds like you need a response wrapper and filter.

Or back up a bit and stop defining HTML at the DB layer. Never the best of ideas. Have the stored procedure produce an abstract data model that you can use to generate HTML at the appropriate time.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Editing the contents of the PrintWriter
It's not a secret anymore!