gwt beginner- error“在项目中找不到任何主机页面” [英] gwt beginner- error "could not find any host pages in project'

查看:154
本文介绍了gwt beginner- error“在项目中找不到任何主机页面”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试创建一个GWT应用程序 - 它具有一个HTML文件(main.html),而java类是main.java。

I m trying to create a GWT app- it has a single HTML file (main.html) and the java class is main.java.

在Eclipse中,我做了右键单击 - > GWT - >模块,并正确定义了新模块。

In Eclipse, I did right click-> GWT -> Module and defined the new module correctly.

然而,添加一些代码后,当我尝试在Dev模式下运行应用程序时,得到错误

However after adding some code, when I try to run the app in Dev mode, I get the error

"Could Not find any host pages in project <project-name> "

我只是在main.java中添加了一些代码,然后保存并尝试以开发模式运行应用程序...什么是我在这里做错了吗?有没有我在这里失踪的东西?

I have simply added some code to main.java, then saved it and tried to run the app in dev mode... What am I doing wrong here? Is there something I am missing here?

推荐答案

正常情况下,如果没有为此项目定义WAR目录,可能会发生这种情况。

Normally it could happen if WAR Directory is not defined for this project.

所以请到项目属性 - > Google(Web应用程序),

So go to Project properties --> Google(Web Application),


  1. checkbox whcih说:这个项目有一个WAR目录

  2. 在WAR Directoy文本框中,浏览并给出项目webapp的路径,如src / main / webapp $ b
  3. 选中复选框从此directoy启动并部署

这可以解决您的问题。

这篇关于gwt beginner- error“在项目中找不到任何主机页面”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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