Encountered a weird behavior when running my Spring Boot + JSF (PrimeFaces) application in Docker container (using java -jar xxx.jar as ENTRYPOINT). It keep complaining “xhtml Not Found in ExternalContext as a Resource” when I access the page, in fact that runs well either using java -jar command or mvn spring:run in host machine.
After some hard time, manage to figure out why…….. phew….
… it was caused by wrong jar packaging structure, and correct structure should look as below:
Credit to BalusC @ stackoverflow