Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File Download Functionality in jsf  RSS feed

 
sucharatkumar alahari
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi


iam getting following exception with below code, please provide pointers to resolve exception.

try {
FacesContext context = FacesContext.getCurrentInstance();


HttpServletResponse response = (HttpServletResponse) context
.getExternalContext().getResponse();

URL url = new URL(address);
conn = url.openConnection();
in = conn.getInputStream();


OutputStream opStrm = response.getOutputStream();

System.out.println("hai hello");
IOUtils.copy(in, opStrm);
context.responseComplete();

// System.out.println(localFileName + "\t" + numWritten);*/
}

Exception:-serveroutputstream in use to write
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!