What you're doing is wrong. You need to implement a Seam Resource and they in the Resource you can just read from the file and write to the response's out put stream. There are plenty of examples on this forum on how to create a resource.
What exactly is the problem? Do you get an exception? Stacktrace?