• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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.
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic