在没有 Jetty 的情况下运行 GWT Speedtracer [英] Running GWT Speedtracer without Jetty

查看:26
本文介绍了在没有 Jetty 的情况下运行 GWT Speedtracer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试运行 GWT (2.1) Speedtracer,但遇到了问题,因为 Jetty 不接受我们的 JDBC 资源(它们在 Tomcat 中工作正常)——可能是因为它找不到包含驱动程序的 JAR.

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 JAR containing the drivers is not found by it.

有没有办法让 GWT speedtracer 在没有 Jetty Server 的情况下运行?

Is there a way to make the GWT speedtracer run without the Jetty Server?

或者如何让 web.xml/context.xml 同时兼容 Tomcat 和 Jetty?

Or how do I make the web.xml/context.xml compatible with both Tomcat and Jetty?

我更愿意在 Jetty 中运行它 - 只要这不会导致 tomcat 出现问题.

I would prefer to run it in Jetty - as long as this won't cause problems with tomcat.

推荐答案

如果你想使用Tomcat:

GWT 文档提到,您可以使用 Speed服务器端的 Tracer 与 SpringSource tc Server(它是一个 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).

如果您想使用 Jetty:

将数据源与嵌入式 GWT Jetty 服务器一起使用是可能的,但并不容易.这在 GWT 1.6 的 Google Group post 中进行了解释.我已经用 GWT 2.1 尝试过这个,它基本上保持相同的过程.这是一个快速概述:

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:

  • 为嵌入式 Jetty 启用 JNDI:
    • 添加jetty-naming-*.jarjetty-plus-*.jar
    • 修改 JettyLauncher,
    • 添加虚拟机参数 -Djava.naming.factory.initial=org.mortbay.naming.InitialContextFactory(或使用 jndi.properties)
    • 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)

      这篇关于在没有 Jetty 的情况下运行 GWT Speedtracer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆