1 Reply Latest reply on Mar 3, 2005 5:08 PM by Paul Cooper

    PrintWriter/JspWriter use different streams?

    Paul Cooper Newbie

      I'm a relative newbie to JBoss installation, but have been coding J2EE apps for a while. My dilemma:

      I'm porting an web app from Websphere 3.5 to JBoss 4.0.1. I've discovered a page rendering issue with JBoss that I can't explain, and don't quite know how to solve. The JSP in question makes heavy use of Java classes that take the HttpServletResponse as one parameter, get the PrintWriter from it, and output to that printwriter.

      The behavior I'm seeing is that all output to the ServletResponse PrintWriter gets written to the client first, then the output from the JspWriter. So the pages are not being displayed correctly. I've examined the .java file created by the Jasper compiler, and the code appears correct.

      So my only conclusion is that these two writers are using different streams.

      Can anyone explain this behavior, or perhaps suggest a solution? I would PREFER not to have to recode, as I'll have to fix a BUNCH of pages, but if that's the final solution, then so be it. But I'll pursue any suggestions available.

      TIA,

      Paul Cooper
      Software Developer
      EMS Performance Improvement Center
      Department of Emergency Medicine
      University of North Carolina-Chapel Hill