• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing to ServletOutputStream

 
philip johnson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I got a filter to write Copyright to my all jsps at top, I created a filter to do the job, when I accessing the serveletoutputstream and write the Copyright appears in somewhere in the page , thus stopping the page from displaying correctley.
Anybody knows it why, and a solution.please.matter utgent.
Thanks.
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why dont you use JSP fragments to display copyright information.You'll get better formatting than a writer or a output stream. Moreover an output stream is generally used for binary data.

and a solution.please.matter utgent.

Please ease up a bit and show some patience.

Hope this helps
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a poor use for a filter. And as you can see, creates some problems.

If you have something you'd like to prefix or postfix to each and every page, look up the concept of JSP preludes and codas.

Or simple create some tag files or simple tags. That's what I'd do for a greater degree of control.
 
philip johnson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys
Thanks for the reply, I sorted it out. It is easy for my project to use filter, instead using jsp .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic