aspose file tools*
The moose likes Servlets and the fly likes Writer already called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Writer already called" Watch "Writer already called" New topic
Author

Writer already called

Vikas Aggarwal
Ranch Hand

Joined: Jun 22, 2001
Posts: 140
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.


Vikas Aggarwal

Founder @
Leads and Deals Limited

www.LeadsAndDeals.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42919
    
  68
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
 
subject: Writer already called