This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writer already called

 
Vikas Aggarwal
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a jsp and a servlet. The servlet has been included in JSP. The servlet uses gzip stream to read file and send to browser. The problem is that when this JSP is called it throws witer already called exception. I understand this is because JSP has already a writer "out" which has been called and my servlet also has one.

Is there a way to get around this problem. I can not convert servlet to jsp because of security.

Thanks in advance.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any time binary streamed data is involved, you should stear clear of JSPs. Why is the servlet accessed from a JSP - can't the servlet be accessed directly?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic