Re: h:link not rendered

Splash Forums PrettyFaces Users h:link not rendered Re: h:link not rendered



This is definitely not the case. From the sources of my jsf-impl.jar:

package com.sun.faces.application.view;

public class MultiViewHandler extends ViewHandler {

public String deriveViewId(FacesContext context, String rawViewId) {
return derivePhysicalViewId(context, rawViewId, true);

protected String derivePhysicalViewId(FacesContext ctx,
String rawViewId,
boolean checkPhysical) {
if (rawViewId != null) {
String mapping = Util.getFacesMapping(ctx);
String viewId;
if (mapping != null) {
if (!Util.isPrefixMapped(mapping)) {
viewId = convertViewId(ctx, rawViewId);
} else {
viewId = normalizeRequestURI(rawViewId, mapping);
if (viewId.equals(mapping)) {
// The request was to the FacesServlet only - no
// path info
// on some containers this causes a recursion in the
// RequestDispatcher and the request appears to hang.
// If this is detected, return status 404
try {
if (checkPhysical) {
return ((ctx.getExternalContext().getResource(viewId) != null) ? viewId : null);
} else {
return viewId;
} catch (MalformedURLException mue) {
if (logger.isLoggable(Level.SEVERE)) {
return null;
return rawViewId;

The method deriveViewId is called with /portal/send-password.xhtml. Since I have a modular webapp it is not found and null is returned from MultiViewHandler ctx.getExternalContext().getResource(viewId) != null) ? viewId : null.

It would be nice if pretty-faces could check the web.xml for a faclets resource resolver <param-name>javax.faces.FACELETS_RESOURCE_RESOLVER</param-name>. If one is defined PrettyViewHandler should give it a try.