[jboss-user] [JBoss Seam] - Re: how to download a file via Seam& JSF,

squ1rr3l do-not-reply at jboss.com
Wed Jan 23 20:37:02 EST 2008


Well I'm not sure why this isn't working for Jasper output, then.  My code is very similar (although there is more involved, of course).  I was actually getting the context before using injection, which worked better.  I'm also using a session EJB - I assume your test code is not.

In any case, using 

  | FacesContext context = FacesContext.getCurrentInstance();
  | 
causes errors even earlier.  When I do

  | HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
  | 
I get an exception:

  | 20:00:28,098 ERROR [STDERR] java.lang.IllegalStateException
  | 20:00:28,108 ERROR [STDERR]  at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:428)
  | 20:00:28,108 ERROR [STDERR]  at com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContextImpl.java:149)
  | 20:00:28,108 ERROR [STDERR]  at org.my.project.session.I9CertForm.generateCertificate(I9CertForm.java:145)
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122868#4122868

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122868



More information about the jboss-user mailing list