File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

response.setHeader issue

 
ashiek aneez
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using WAS 4.0.

EJB

Am trying to download messages from application to a test file.

It is working fine.

Sometimes it is showing some error message as,

TraceNLS No message text associated with key WARNING:.Cannot.set.header..Response.already.committed. in bundle com.ibm.ejs.resources.seriousMessages
SRTServletRes WARNING: Cannot set header. Response already committed.


how should i overcome this issue.

please help me.

thanks.
 
Rob Spoor
Sheriff
Pie
Posts: 20393
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Headers can only be set if nothing has been written to the page yet. Apparantly this is not the case.

Now writing to the page can be done automatically when using JSPs. For instance:
At the end of line 1, a line break is sent to the page already.

Moving to our servlets forum.
 
ashiek aneez
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tom,

for example,

I assume that this code is working fine for minimal rows (20 - 25).

In Development setup and in testing setup this is working fine.

In production setup, it is working but sometime it gets some error message as


TraceNLS No message text associated with key WARNING:.Cannot.set.header..Response.already.committed. in bundle com.ibm.ejs.resources.seriousMessages
SRTServletRes WARNING: Cannot set header. Response already committed.




Please help me.

thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic