• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
We find this kind of rampant individuality very disturbing. But not this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic