• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Pretty-print JSPX

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I was wondering if someone might have some insight on a little problem I am having with a Filter I wrote for pretty printing jsp documents[jspx extension]. It seems to be the consensus that you can't make it pretty print by default so I used a response wrapper and replaced the ServletOutputStream with a ByteArrayOutputStream using a rather hack delegate following the compression example in the Head First Servlets and JSP book. It only sort of works though. Most of the tiles run all the way through and output to the ByteArrayOutputStream fine except the last one. The problem is that when the last one fails I end up with incomplete XHTML thus I can't treat it as XML and output it as a pretty printed document. It's not like its critical but I can find nothing unusual looking at the JSPX that would cause the output stream to be truncated in this way and I am not getting an error that would indicate what the problem is. Just wondering if anyone has any ideas on it. By the way, when I use the response object straight up(no wrapped objected or delegate) the page renders completely and correctly. If there is another forum more appropriate for this question please let me know.
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic