Running GWT Speedtracer without Jetty

前端 未结 1 1003
被撕碎了的回忆
被撕碎了的回忆 2021-01-01 08:29

We are trying to run the GWT (2.1) Speedtracer, but have trouble with it, since Jetty doesn\'t accept our JDBC resources (they work fine in Tomcat) - probably because the JA

相关标签:
1条回答
  • 2021-01-01 08:41

    If you want to use Tomcat:

    The GWT documentation mentions, that you can use Speed Tracer on the server-side with the SpringSource tc Server (which is a Tomcat server).

    If you want to use Jetty:

    Using DataSources with the embedded GWT Jetty server is possible, but not easy. It's explained in this Google Group post for GWT 1.6. I have tried this with GWT 2.1, and it basically remains the same procedure. Here's a quick outline:

    • enable JNDI for the embedded Jetty:
      • add jetty-naming-*.jar, jetty-plus-*.jar
      • modify the JettyLauncher,
      • add the VM arg -Djava.naming.factory.initial=org.mortbay.naming.InitialContextFactory (or use jndi.properties)
    • create a jetty-env.xml (similar to Tomcat's context.xml)
    • define a resource-ref in the web.xml
    0 讨论(0)
提交回复
热议问题