Google Web Toolkit的空白页

我是Google Web Toolkit的新手。我尝试使用NetBeans创建新项目,并从Frameworks-list中获取Google Web Toolkit。如果我将“org.yournamehere.Main”留作GWT模块名称,它就可以工作。但是如果我在那里写了一些东西,我只能看到一个空白的html页面,其中包含以下内容:
<head>

    <meta name='gwt:module' content='vvv.test.module=vvv.test.module'>

    <title>moduuli</title>

</head>

<body>

    <script type="text/javascript"  src="vvv.test.module/vvv.test.module.nocache.js"></script>

</body>
    
已邀请:
尝试; (将{PROJECT_NAME}替换为您的项目名称)
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <!-- <meta name="gwt:property" content="locale=tr"> -->

    <!--                                                               -->
    <!-- Consider inlining CSS to reduce the number of requested files -->
    <!--                                                               -->
    <link type="text/css" rel="stylesheet" href="{PROJECT_NAME}.css">

    <!--                                           -->
    <!-- Any title is fine                         -->
    <!--                                           -->
    <title>{TITLE}</title>

    <!--                                           -->
    <!-- This script loads your compiled module.   -->
    <!-- If you add any GWT meta tags, they must   -->
    <!-- be added before this line.                -->
    <!--                                           -->
    <script type="text/javascript" language="javascript" src="{PROJECT_NAME}/{PROJECT_NAME}.nocache.js"></script>
  </head>

  <!--                                           -->
  <!-- The body can have arbitrary html, or      -->
  <!-- you can leave the body empty if you want  -->
  <!-- to create a completely dynamic UI.        -->
  <!--                                           -->
  <body>
....
    
我知道了。 NetBeans将{PROJECT_NAME} .nocache.js文件放入错误的文件夹(My Documents NetBeansProjects ProjectName build web org.yournamehere.Main。在gwt.properties中有gwt.output.dir = / org.yournamehere.Main行.file。我解决了这个问题并制作了“干净和构建”。 好消息是,现在我对GWT了解得更多。不管怎么说,还是要谢谢你。     
当我使用NetBeans启动第一个GWT RPC Hello-World应用程序时遇到了同样的问题。 获取空白页面,您可能需要检查以下内容: 网页文件夹下的WelcomeGWT.html(或index.html) 确保脚本源链接正确: SRC = “org.yournamehere.ModuleName / org.yournamehere.ModuleName.nocache.js” 如果您使用重命名属性检查 为什么要改变“模块 - &gt;重命名为“ .gwt.xml文件中的属性给出错误 Web-INF文件夹下的Web.xml文件 确保url-pattern正确:
<servlet-name>ServerSideServiceImpl</servlet-name>
<url-pattern>/org.yournamehere.ModuleName/RemoteServiceRelativePath</url-pattern>
要更好地了解RemoteServiceRelativePath,请检查GWT RPC上的错误404 检查您的EntryPoint.java 有时它可能是小错误,例如, 忘记将面板添加到RootPanel。 要么 您的WelcomeGWT.html中的ID拼写错误 RootPanel.get( “gwtContainer”)添加(面板)。     

要回复问题请先登录注册