tags:

views:

524

answers:

1

I have a servlet which is in the same web application as the JSF servlet. How do I replace (rather than redirect) the servlet response with the JSF response?

A: 

Not sure I fully understand your question - but if you want to include the output from a JSF page in your servlet response, something like:

public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        // Do stuff
        req.getRequestDispatcher("/blah.jsf").forward(req, res);
        // Do other stuff
}

Should do the trick

Martin