cancel
Showing results for 
Search instead for 
Did you mean: 

JCo writeHTML (java.io.Writer writer)

0 Kudos

Hello,

I am using writeHTML(java.io.Writer writer) to dump something to a JSP page.

However this call seems to close the "out" descriptor, which I think is programming with side effects and as such not correct. Has anyone experienced the same problem?

kind regards,

Frans.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Frans,

I believe the writeHTML method is only intended for debugging purposes.

However, you could use a StringWriter to buffer the results like this:


StringWriter sw = new StringWriter();
jco.writeHTML(sw);
out.println(sw.toString());

Hope this helps.

Best regards,

Daniel

Answers (0)