My requirement is to serve "index.html" irrespective of what route is being set in the request. I have referenced Routing template format for undertow but to no avail. It seems to work for people. The handler looks like
PathHandler path1 = Handlers.path()
.addPrefixPath("/*", new ResourceHandler(new FileResourceManager(new File(System.getProperty("user.dir")+"ed.jpg"), 100 * 1024)).setWelcomeFiles("index.html") );
And the handler is being added like
server = Undertow
.builder()
.addHttpListener(serverConfig.getHttpPort(), serverConfig.getHost())
.addAjpListener(serverConfig.getAjpPort(), serverConfig.getHost())
.setHandler(path1)
.build();
I have tried using PathResourceManager as well. That doesn't work. The handler is able to match paths without wildcards perfectly. Only cases with wildcard character seems to fail.
Any help on this would be appreciated.