Hi Todd, adding to Alexis answer, maybe this can be helpful: it shows a 
working sample of a WAR -> JAR migration: 
https://cloud.google.com/appengine/docs/standard/java11/java-differences#war_migration_example

My understanding from the docs is that the Java 11 runtime requires you to 
have a main method, and your main method must be a valid HTTP Server 
implementation. The HTTP Server used (the link uses  
com.sun.net.httpserver.HttpServer one)  need to have support for compiling 
JSPs. Maybe you can bundle your WAR output and use Jetty as the main 
entrypoint using the Jetty embedded into your app? 
https://examples.javacodegeeks.com/enterprise-java/jetty/jetty-jsp-example/

There is also a way to "precompile" JSPs as part of the build, and that 
will transpile them into servlets making them compatible with the runtime. 
The old Java SDKs did that during app deployment as part of the "appcfg 
update" step. If you use maven this plugin seems to do that as part of the 
build process:  https://sling.apache.org/components/jspc-maven-plugin/ 

Hope this helps! 

Em quinta-feira, 6 de agosto de 2020 às 18:52:46 UTC-3, Alexis (Google 
Cloud Platform Support) escreveu:

> Hello Todd,
>
> You are correct for the support of App Engine Standard with JAR and if you 
> prefer WAR it's understandable. There is a possible workaround here[1] but 
> that's for old Java 7 and I think now 8. There is an old discussion about 
> that here[2]. Deploying it in Flex is the better option. However, there is 
> an explanation here[3], under "What are the changes between the Java 8 and 
> Java 11 standard runtimes?", as to why it's not compatible. It's due to the 
> API. To be future-proof, it might be best to stay with the Flex engine. I 
> understand Standard engine is cheaper, but the API is older.
>
> [1] 
> https://cloud.google.com/appengine/docs/standard/java/configuration-files#an_example
> [2] https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues/1912
> [3] https://ludoch.github.io/java11.html
>

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/08936b81-278b-4c1b-8ab3-37e0c2d27244n%40googlegroups.com.
  • [google-app... Todd Murchison
    • [googl... 'George (Cloud Platform Support)' via Google App Engine
      • Re... Todd Murchison
        • ... 'Alexis (Google Cloud Platform Support)' via Google App Engine
          • ... Ronoaldo Pereira
    • [googl... Rémi Bastide
    • [googl... pravanjan palai

Reply via email to