This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Getting JSP's HTML output inside the same JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Getting JSP Watch "Getting JSP New topic

Getting JSP's HTML output inside the same JSP

Kingsly Theodar

Joined: Feb 21, 2004
Posts: 19
Is there any way of getting the html output of a JSP.

I would like to consume the string(HTML output), after extracting it out of the PrintWriter object.

Inspecting the Servlet API, I was not able to figure out a way.

Is using servlet's out.println the only way?!

Please help.

Thanks in advance,
Frederic Esnault
Ranch Hand

Joined: Feb 13, 2006
Posts: 284
I'm not sure I understand what you want to do. Can you clarify, please?

SCJP 5 - SCWCD 1.4 - SCBCD 1.3 - Certification study documents/resources:
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 951

I think you want to consume the respons generated by the JSP page before displaying to browser. Look at the filters, it may useful to you.


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
I agree. Here's the link:
subject: Getting JSP's HTML output inside the same JSP
It's not a secret anymore!