I have to use a few servlets in my Web application. The servlets perform a bit of processing and then redirect the user to an xhtml page.
I already have navigation rules in my app, which I'd like to re-use in my servlet.
Example:
<navigation-case>
<from-outcome>bookingFailed</from-outcome>
<to-view-id>/SecureUser/Reservation/New/BookingFailed.xhtml</to-view-id>
<redirect/>
</navigation-case>
Now inside the servlet, I'd like to use something like:
response.sendRedirect("bookingFailed");
instead of
response.sendRedirect("faces/SecureUser/Reservation/New/BookingFailed.xhtml");
How can I go about doing this?