The parameters that the user enter are sent to the servlet which makes an xml format response (The system logic requires that ).
and with the navigation rule I can display to the user that his parameter has submitted.
The problem is :-
The navigation rule doesn't work with servlet calling in the bean ,
it throws the following exception
javax.servlet.ServletException: Cannot forward after response has been committed
so how can I display to the user that his parameter has been submitted ?
OK. Let's start by pinning down the terminology. Sometimes there's value in nit-picking.
You never "call" servlets, you make requests to them. Backing up even further, when a web app makes a request of another web app, that's really just a web services request.
You also seem to be saying that you want one user request to generate 2 separate outputs, in 2 different formats (content-types). HTTP doesn't do that. One request, one response. No more, no less. So you can either have the button, the XML or build an HTML page with a button on it that displays the XML as text, but you can't have the XML and the button as 2 separate output streams from the same request.
In any event, you shouldn't generate XML from JSF, just as you shouldn't generate any other non-HTML format data from JSF. I'm ignoring the fact that xhtml is both HTML and XML, since the "html" part is what counts. JSF generates html. To generate non-html XML, use a servlet, instead, just like I advised on a recent thread about generating Excel.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: how provide navigation rule and call servlet