aspose file tools*
The moose likes JSP and the fly likes Redirecting out put of JSP to a StringBuffer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Redirecting out put of JSP to a StringBuffer" Watch "Redirecting out put of JSP to a StringBuffer" New topic
Author

Redirecting out put of JSP to a StringBuffer

Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
Hi friends,
Is there any way to Redirecting out put of JSP to a StringBuffer?
I mean i need to get all html content generated by a JSP to a String Buffer.
Please help me.
Thanks


Sarath Mohan
Subrahmanyam Allamaraju
Greenhorn

Joined: Nov 01, 2001
Posts: 20
> Is there any way to Redirecting out put of JSP to a StringBuffer?
> I mean i need to get all html content generated by a JSP to a
> String Buffer.
Simply put, no, not on the server side. The reason is because, the compiled servlet (for the JSP) writes the response to an already opened connection.
However, you may do this from the client side (i.e., from the one making the request). You can try sending a request to this JSP from another servlet, and read the response.


Subrahmanyam Allamaraju<BR>Author of <A HREF="http://www.amazon.com/exec/obidos/ASIN/1861005377/ref=ase_electricporkchop/103-0514572-3811868" TARGET=_blank rel="nofollow">Professional Java Server Programming J2EE 1.3 Edition</A>
Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
Hello Subramanyam,
Could you make it more clear?
Thanks for your reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Redirecting out put of JSP to a StringBuffer