【问题标题】:Configuring GAE Remote API on the Server在服务器上配置 GAE Remote API
【发布时间】:2014-08-22 15:44:48
【问题描述】:

https://developers.google.com/appengine/docs/java/tools/remoteapi 的 Remote API for Java 简介运行良好,但我只收到 404 错误:

Exception in thread "main" java.io.IOException: can't get appId from remote api; status code = 404, body: 
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>404 Not Found</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Not Found</h1>
<h2>The requested URL <code>/remote_api</code> was not found on this server.</h2>
<h2></h2>
</body></html>

我认为这是因为服务器配置不正确。 “在服务器上配置远程 API”部分中的说明对我来说太模糊了——初学者。 声明“将以下内容添加到您的 web.xml”是问题所在。我不确定该语句指的是哪个 web.xml。将 web.xml 放在各种明显的地方,例如 war/WEB-INF/web.xml 似乎没有帮助。还尝试将其作为动态 Web 项目(在 Eclipse 中)使用 WebContent/WEB-INF/web.xml 中的 xml 代码,这也没有帮助。

看起来像是对使用 Remote API 但看不到前进方向的 Java 项目结构的基本误解。建议将不胜感激。

【问题讨论】:

    标签: google-app-engine web.xml remoteapi


    【解决方案1】:

    在这种情况下,它是一个单模块应用程序,web.xml 文件直接位于目录 war/WEB-INF 中。

    您可以通过关注this tutorial 为 Google App Engine 构建完整的示例应用程序。

    Google Plugin for Eclipse 也会为您创建一个类似的示例应用程序。

    【讨论】:

      猜你喜欢
      • 2019-03-31
      • 2016-07-14
      • 2012-11-11
      • 1970-01-01
      • 1970-01-01
      • 2017-09-21
      • 2018-01-24
      • 1970-01-01
      • 2015-06-15
      相关资源
      最近更新 更多