- spring boot(1.5.6.RELEASE) not support
META-INF/resources
in fat jar/exploded directory. - spring-boot-sample-web-jsp only support war packaging.
This jsp sample support fat jar and META-INF/resources
in fat jar/exploded directory.
-
Add jsp/jstl dependencies:
<dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency>
-
In servlet 3.0 specification, the app can put static resources in
META-INF/resources
-
StaticResourceConfigurer
to add fat jar into tomcatResourceSet
.
-
Run as fat jar:
mvn clean package -DskipTests java -jar jsp-start/target/jsp-start-0.0.1-SNAPSHOT.jar
-
Run in exploded directory
mvn clean package -DskipTests cd jsp-start/target/ unzip -d start jsp-start-0.0.1-SNAPSHOT.jar cd start/ java org.springframework.boot.loader.PropertiesLauncher