Open kazuki43zoo opened 8 years ago
This article will help you to migrate legacy JSP app to Spring Boot for your 1st step. http://hillert.blogspot.jp/2016/03/spring-boot-with-jsp-in-executable-jar.html
This is sample application. https://github.com/making/make-jar-not-war
@making Thanks. I simply tried it with an existing jsp-based sample, too. https://github.com/ikeyat/spring-beanvalidation-sample
After changing packaging type from jar into war, it got to work fine as executable war with a command java -jar xxx.war
.
Of course every thing is same as written in the reference, but I'm suspecting that there may be other limitations with embedded tomcat.
Import thing is using not war but jar.
Move jsp files to src/main/resources/META-INF/resources/WEB-INF/jsp
.
Be careful the article above does not encourage using JSP for new projects. It's just intended to be used in the migration.
Oh, I misunderstood your message and the article... The reference officially says http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-jsp-limitations so that the trick shown the article is not better in the production environment. Why don't you adopt executable war file that is officially available in Spring Boot?
@making, It is very useful information !! I've tried it on https://github.com/kazuki43zoo/spring-boot-multi-sample/tree/master/screen-jsp.
When a JSP custom tag library is used, spring-boot's integration test is failed.
It can be resolved that customize settings of maven-surefire-plugin
as follows:
http://stackoverflow.com/questions/33281716/spring-boot-integration-test-maven-tests-missing-jstl
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useManifestOnlyJar>false</useManifestOnlyJar> <!-- ### Add ### -->
</configuration>
</plugin>
Description
Investigate Spring Boot features and recommended project structures.
Possible Solutions
TBD
Affects Version/s
N/A
Fix Version/s
Issue Links