Welcome to the JavaRanch, Simone!
A couple of hints. Rather than append to an old message
thread (which we call "resurrecting a zombie"), it's better to start a thread of your own. Also, we have a "Code" button that can wrap special tags around code and XML samples, which helps make them more readable.
As a general rule,
you should not use
JSF to produce downloaded content. Use a traditional
servlet for that purpose. JSF won't mind. It can even provide data for the servlet using shared session-scope beans.
JSF is designed to produce HTML forms and similar content. If you attempt to force it to produce non-HTML output, the code tends to be both ugly and unreliable. A servlet can do it much more simply and you're less likely to see things break when new versions of JSF come along.