• 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

java.lang.IllegalStateException + struts + JasperPrint

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

First of all, I read the topic http://faq.javaranch.com/view?IllegalStateException. But still in doubt since my scenario goes like this:

#1. Web application, using RAD and Struts (servlets, filters, actions, and so on....)
#2. A request to generate a PDF, after the Action.execute processing, works like this:


#3. After the execution above, my filter is throwing the exception whit the warning:


WARNING: Cannot set status. Response already committed.
WARNING: Cannot set header. Response already committed.
javax.servlet.ServletException: getOutputStream() has already been called for this response
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:166)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)



What should I do to avoid this cenario?

RegardĀ“s,
Rafael.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We solved a similar exception related with sendredirect using lady4j. In our case the problem was that we already retrieved the outputstream and we tried to redirect... be careful with that.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic