Reply To: pretty url broken

Splash Forums PrettyFaces Users pretty url broken Reply To: pretty url broken


I guess you need something like this:

String rewritten = externalContext.encodeRedirectURL( path, new HashMap<>() );
externalContext.redirect(url + rewritten);

Outbound URLs are rewritten using HttpServletResponse.encodeRedirectURL(), so if you are doing redirects manually, you will have to call this method yourself.

BTW: I think you don’t need url in your code. Just do:

externalContext.redirect(request.getContextPath() + rewritten);