fred4jupiter/spring-boot-jsf

Application is not running through Java -jar

Opened this issue · 6 comments

Application is not running through Java -jar
medbs commented

is there a way to fix this problem ?

medbs commented

Packaging the project as War instead of Jar would solve the issue.All what needs to be done is modify the pom.xml to package the project as WAR (<packaging>war</packaging> ) ,and then move the view files(xhtml) from main/resources/META-INF/resources/ to main/webapp/ (create a new folder called webapp in the same level as resources).

Maybe this happend since the last version update. I would like to keep the Fat-Jar packaging, but I have to invest some time to fix this.

I'm a bit confused. I thought the whole point of using Spring Boot was to use fat jars?

BTW: I'm sure you already know it, but if you don't, I'd like to point you to the JoinFaces project. That's a great project resembling your (@fred4jupiter 's) project.

I'd also like to point you to my article discussing the incompatibilities between Spring and JSF. Things may change with JakartaEE, but it was the corporate policy to ignore the compatibility issues. So a large part of JSF 2.3 doesn't work with Spring. Actually, that's not even a bad thing: they managed to integrate seamlessly with CDI and with the rest of the JavaEE framework.

I'm a bit confused. I thought the whole point of using Spring Boot was to use fat jars?

Yes, in most cases this is the intention to bundle the application with its runtime environment (e.g. Tomcat). But you can also choose to build it as a WAR file. In that case you benefit from the Spring Boot features, but can deploy it to an application server of your choice.

BTW: I'm sure you already know it, but if you don't, I'd like to point you to the JoinFaces project

Yes, I heard of it. And they did a great job. My purpose of this project was to show a way you can setup a Spring Boot project using JSF as view technology. I did not use ManagedBean, Named annotations and so on. The backing bean is still a spring bean which can be addressed from within the view (*.xhtml). Generally this project is working. Only the FAT JAR does not seems to work. And that´s what I have to figure out.