diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java index af2b65b1..b28b005f 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfViewFactory.java @@ -161,7 +161,11 @@ public class JsfViewFactory implements ViewFactory { throw new IllegalStateException( "A ContextResource is required to get relative view paths within this context"); } - return ((ContextResource) viewResource).getPathWithinContext(); + String viewPath = ((ContextResource) viewResource).getPathWithinContext(); + if (!viewPath.startsWith("/")) { + viewPath = "/" + viewPath; + } + return viewPath; } }