Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/398.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Restlet GAE样本不';t使用谷歌应用程序引擎工具包1.4.0_Java_Eclipse_Google App Engine - Fatal编程技术网

Java Restlet GAE样本不';t使用谷歌应用程序引擎工具包1.4.0

Java Restlet GAE样本不';t使用谷歌应用程序引擎工具包1.4.0,java,eclipse,google-app-engine,Java,Eclipse,Google App Engine,我在Eclipse中运行GAE。我所做的只是按照样本中的说明: 当我尝试访问URL localhost:8888/restest时,我遇到一个异常: javax.servlet.UnavailableException: java.lang.NullPointerException at org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:415) ... the rest of stack tra

我在Eclipse中运行GAE。我所做的只是按照样本中的说明:

当我尝试访问URL localhost:8888/restest时,我遇到一个异常:

javax.servlet.UnavailableException: java.lang.NullPointerException
at org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:415)
... the rest of stack trace
我尝试了不同版本的RESTlet。你知道怎么让它工作吗

是的,我在Eclipse中使用GAE。web.xml:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

<servlet>
    <servlet-name>RestletServlet</servlet-name>
    <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
    <init-param>
        <param-name>org.restlet.application</param-name>
        <param-value>secretPackage.FirstTestApplication</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>RestletServlet</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>

RestletServlet
org.restlet.ext.servlet.ServerServlet
org.restlet.application
secretPackage.FirstTestApplication
RestletServlet
/*

您正在使用Eclipse的Google插件吗?如果没有,我建议您安装插件,因为它在某种程度上简化了过程


你能粘贴你的web.xml文件吗?

可能你忘了像我一样添加一个jar:org.restlet.ext.servlet.jar