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

response.setHeader issue

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You don't like waffles? Well, do you like this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic