Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Download Functionality in jsf

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