Ensuring view template paths always have a leading "/". This allows templates to be loaded from plain OSGI bundles in the S2AP.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user