Hi,

I have been building an app on top of the* helloworld-springboot* tutorial. 
It is working great for APIs, but I wanted to add JSP support to include a 
simple admin console.

So I modified the helloworld-springboot project as following:

   1. Built a WEB-INF structure under src/main/webapp, including a jsp 
   directory
   2. Modified application.properties to add spring.mvc.view.prefix and 
spring.mvc.view.suffix 
   configuration that points to the directories in (1)
   3. Added dependencies to the pom.xml file for tomcat and jstl

<dependency>
   <groupId>org.apache.tomcat.embed</groupId>
   <artifactId>tomcat-embed-jasper</artifactId>
   <version>9.0.12</version>
</dependency>
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>

 

4. Added a new @controller to SpringBoot, with the corresponding 
@GetMapping(s)

 
*Running locally with mvn spring-boot:run works great, including JSP 
rendering, redirections, etc.*

*Now, when I deploy to GAE flex using the following yaml, the JSP fails to 
render with:*

*/WEB-INF/jsp/foo.jsp 404 not found*

runtime: java
env: flex

runtime_config:  # Optional
  jdk: openjdk8

manual_scaling:
  instances: 1

resources:
  cpu: 1
  memory_gb: 2
  disk_size_gb: 10


*My questions are:*

   - *Can you help me understand why JSP works locally but not deployed on 
   GAE? Is there any scope directive I am missing in the pom for the 
   tomcat-embed-jasper dependency?*
   - *Do I need to use Jetty runtime to compile and render JSPs? I would 
   much rather use the standard spring boot embedded tomcat*
   - *Do I need a web.xml with Tomcat? (I don't think that is the case)*
   - *Does it matter selecting JAR vs. WAR as packaging?*

*Thanks in advance,*
*Daniel*

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/90304a02-0992-4a80-b21c-4bb7f5a9219f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to