-
Notifications
You must be signed in to change notification settings - Fork 1
org.omnifaces.FACES_VIEWS_SCAN_PATHS only works when running with quarkus:dev #83
Comments
I have a feeling the bug is here: @SuppressWarnings("unchecked")
private static Set<String[]> getRootPathsAndExtensions(ServletContext servletContext) {
Set<String[]> rootPaths = (Set<String[]>) servletContext.getAttribute(SCAN_PATHS);
if (rootPaths == null) {
rootPaths = new HashSet<>();
rootPaths.add(new String[] { WEB_INF_VIEWS, null });
Set<String> multiViewsPaths = new TreeSet<>(Collator.getInstance(ENGLISH)); // Makes sure ! is sorted before /.
for (String rootPath : csvToList(servletContext.getInitParameter(FACES_VIEWS_SCAN_PATHS_PARAM_NAME))) {
boolean multiViews = rootPath.endsWith("/*");
if (multiViews) {
rootPath = rootPath.substring(0, rootPath.lastIndexOf("/*"));
}
String[] rootPathAndExtension = rootPath.contains("*") ? rootPath.split(quote("*")) : new String[] { rootPath, null };
rootPathAndExtension[0] = normalizeRootPath(rootPathAndExtension[0]);
rootPaths.add(rootPathAndExtension);
if (multiViews) {
multiViewsPaths.add(rootPathAndExtension[0]);
}
}
servletContext.setAttribute(SCAN_PATHS, unmodifiableSet(rootPaths));
servletContext.setAttribute(MULTIVIEWS_PATHS, unmodifiableSet(multiViewsPaths));
}
return rootPaths;
} OmniFaces must not be scanning or calculating something correctly with Quarkus since Quarkus uses different paths /resources instead of /WEB-INF ? |
Yea it could be. Quarkus has 2 packaging modes, the new "fast-jar" mode which is the default and |
Hey when I create a fast-jar iwth my Quarkus Faces showcase and run
Have you seen this error before? |
weird i had to add <dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.guicedee.services</groupId>
<artifactId>xalan</artifactId>
<version>1.2.0.3-jre17-rc1</version>
</dependency> to make it work. |
Strange, I never had that error, nor do I have any of those dependencies. |
Extensionless mapping only seems to work when running the application with quarkus:dev.
After packaging the app with: mvn package and running the final jar, it doesn't work. There is no error message, just shows an empty page saying "Not found"
The text was updated successfully, but these errors were encountered: