简体   繁体   English

在GWT服务器端使用外部Jar

[英]Using external Jars on GWT server-side

Im new to GWT. 我是GWT的新手。 Im using the eclipse plugin and started tweaking google's 'hello, world!' 我正在使用eclipse插件,并开始调整Google的“你好,世界!” project: greetServlet. 项目:greetServlet。

Im trying to build a webapp that will use XML (de)serializing. 我正在尝试构建一个将使用XML(反序列化)的webapp。 I chose XStream library for the relative easiness. 为了相对容易,我选择了XStream库。 my classpath includes the xstream.jar. 我的类路径包括xstream.jar。 I also manually copied the jar to the WEB-INF/lib folder (Is this a mistake? is there a way in which eclipse will copy external jars by itself to the deployment folder?). 我还手动将jar复制到WEB-INF / lib文件夹(这是一个错误吗?eclipse是否可以通过一种方式将外部jar自身复制到部署文件夹?)。

I added a single line to GreetingServiceImpl.greetServer XStream xs = new XStream(); 我在GreetingServiceImpl.greetServer XStream中添加了一行Xs = new XStream(); and this is where it fails. 这就是失败的地方。

It throws an exception on RPC call to greetServer. 它在对greetServer的RPC调用上引发异常。 Why? 为什么? What's the matter? 怎么了?

Is this specific to XStream or am I mising some thing in adding an external jar? 这是XStream特有的,还是我在添加外部jar时误了点?

If you are running in the development mode in eclipse, it could be that XStream is not supported by the Google Appengine whitelist. 如果您在Eclipse中以开发模式运行,则可能是Google Appengine白名单不支持XStream。

http://code.google.com/intl/es-AR/appengine/docs/java/jrewhitelist.html http://code.google.com/intl/zh-CN/appengine/docs/java/jrewhitelist.html

If this is your problem, you can run your application in a Tomcat. 如果这是您的问题,则可以在Tomcat中运行您的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM