0

我在eclipse的tomcat服务器中使用struts2创建了java web应用程序。我想在创建它之后将它部署在 Google App Engine 中。所以我为 Eclipse 安装了谷歌应用引擎插件,并使用下面的方法将项目转换为在谷歌应用引擎上部署

右键单击项目

谷歌 -> 应用引擎设置

勾选“使用 Google App Engine”框

之后,当我尝试部署它时。它迫使我输入应用程序 ID。当我输入使用 www.appengine.google.com 网站创建的应用程序 ID 时,eclipse 说

Cannot set application ID (appengine-web.xml is missing)

错误。我应该手动创建那个 xml 还是可以自动创建它?如果我应该手动创建它,执行它的步骤是什么。

4

4 回答 4

1

Struts 2 与 Google App Engine 兼容,但您需要应用一些变通方法。有关详细信息,请查看Java 技术与 App Engine 的兼容性列表。检查为使 Struts 2 在 GAE 中工作而提供的信息。

希望这可以帮助!

于 2012-10-26T16:49:41.200 回答
0

Hi Better check for appengine-web.xml file in the WEB-INF folder. If it is existing there then try changing you appengine deploy id. i.e., Create a New ID and deploy into that. If it works fine OK.

Else

Create a new web application project . Better Select it from Google toolbar and copy your files to that new created one. Because in the new created one there will be defaulted appengine-web.xml and try to deploy. Hope it works. Like if it works .

Thank You.

于 2014-07-09T09:30:37.450 回答
0

尽管您使用了 struts,但可以通过在其 war 文件中提供一个应用引擎 xml 来部署它,并且您应该将 appengine sdk 添加到这个 struts 项目中。然后尝试将其部署在 localost 中。

如果它确实成功,您可以通过在应用引擎 xml 中提供应用程序 ID 来将其部署到应用引擎中。

参考:Java 应用程序配置

于 2013-04-12T06:34:42.443 回答
0

它对我有用。首先,我创建了一个 HelloWord GAE 项目,复制了 appengine-web.xml 的内容并将其粘贴到我缺少该文件的项目中。您需要更改应用程序 ID。

另外,检查 WEB-INF 文件夹下是否有 web.xml 文件。您将在此处声明将应用程序部署到 GAE 后将加载的文件。

于 2014-10-21T13:12:29.803 回答