July 18th, 2003, 02:55 PM
capture output of out.println
I have a jsp (test.jsp) that outputs a number to the web browser using out.println. Instead of outputing to the browser, I want to send it to another jsp.
So from another jsp (sample.jsp), I want to call test.jsp, capture it's output, keep it as a variable to be able to manipulate it, and then display it back onto sample.jsp
How can I capture that output to display on sample.jsp?
What method(s) do I use?
Thanks for your help!
July 18th, 2003, 03:00 PM
Instead of using out.println, store whatever that would ouptput into a variable, and pass it using either POST (form) or GET (url).
You could also use sessions/cookies, but that's a bit messier and users can disable cookies.