dev@glassfish.java.net

Re: Seeking Review from Kin-Man Chung: Change to JSTL impl

From: Kin-man Chung <Kin-Man.Chung_at_Sun.COM>
Date: Wed, 09 Nov 2005 14:11:07 -0800

+1.

On Wed, 2005-11-09 at 12:44, Ed Burns wrote:
> Part of the fix for this bug:
>
> https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=193
>
> is in the JSTL implementation.
>
> Here is a patch from Kin-Man that I have slightly
> modified to take it the last mile.
>
> Index: ImportSupport.java
> ===================================================================
> RCS file:
> /cvs/glassfish/appserv-jstl/src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java,v
> retrieving revision 1.2
> diff -r1.2 ImportSupport.java
> 23a24
> > import java.io.Writer;
> 429a431,432
> >
> > private HttpServletResponse response;
> 436a440
> > this.response = response;
> 440c444
> < public PrintWriter getWriter() {
> ---
> > public PrintWriter getWriter() throws
> IOException {
> 445c449
> < return new PrintWriter(sw);
> ---
> > return new PrintWriterWrapper(sw,
> response.getWriter());
> 493a498,518
> >
> > private static class PrintWriterWrapper extends
> PrintWriter {
> >
> > private StringWriter out;
> > private Writer parentWriter;
> >
> > public PrintWriterWrapper(StringWriter out,
> Writer parentWriter) {
> > super(out);
> > this.out = out;
> > this.parentWriter = parentWriter;
> > }
> >
> > public void flush() {
> > try {
> > parentWriter.write(out.toString());
> > StringBuffer sb = out.getBuffer();
> > sb.delete(0, sb.length());
> > } catch (IOException ex) {
> > }
> > }
> > }
>
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>