Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File Download Functionality in jsf  RSS feed

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

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

try {
FacesContext context = FacesContext.getCurrentInstance();

HttpServletResponse response = (HttpServletResponse) context

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

OutputStream opStrm = response.getOutputStream();

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

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

Exception:-serveroutputstream in use to write
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!