gwt beginner- error "could not find any host pages in project'

让人想犯罪 __ 提交于 2019-12-23 07:38:08

问题


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

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

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> "

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?


回答1:


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

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

  1. Check the checkbox whcih says "This project has a WAR directory"
  2. In WAR Directoy textbox, browse and give path to your project webapp something like "src/main/webapp"
  3. Check the Checkbox "Launch and Deploy from this directoy"

This should fix your problem.



来源:https://stackoverflow.com/questions/9909939/gwt-beginner-error-could-not-find-any-host-pages-in-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!