No part of your JSF code should ever handle File I/O directly. You should use a helper/business class to do this for you and then call that class' method(s) from your backing bean (controller).
Look into writing a text file with Java and forget about JSF. Then, take the code you've written and call it from your backing bean. We have an IO And Streams forum in case you need to ask specific questions about IO.
Originally posted by stuart broomfield: hi and thanks for the feedback. I am attempting this from a backing bean alright but am not getting anywhere. dont i need to get a facescotext and use that somehow?
You might just try what I already suggested. Why do you think you need to get the faces context and "use that somehow"?