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 Servlets and the fly likes Editing the contents of the PrintWriter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Editing the contents of the PrintWriter" Watch "Editing the contents of the PrintWriter" New topic
Author

Editing the contents of the PrintWriter

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hello:

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
Marshal

Joined: Jan 10, 2002
Posts: 56521
    
  14

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Editing the contents of the PrintWriter
 
Similar Threads
CallableStatement
Return Value from Stored Procedure
writing log to a file from java stored procedure
login stored pro, how to ?
Callable Statement - Cursors