Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t重命名gwt模块_Gwt - Fatal编程技术网

Can';t重命名gwt模块

Can';t重命名gwt模块,gwt,Gwt,我已经阅读并决定重命名我的gwt模块,但出现了一个错误。IDEA在创建gwt模块项目时自动生成test.gwt.xml。它说: <module rename-to="test"> inside test.gw.xml。若我删除“重命名为…”并运行应用程序,GWT插件会给我一个错误。在gwt.xml中,它似乎是必需的。这与文章的“重命名模块”部分相矛盾。为什么我不能删除或重命名 下面是test.gwt.xml: <!DOCTYPE module PUBLIC "-//Goo

我已经阅读并决定重命名我的gwt模块,但出现了一个错误。IDEA在创建gwt模块项目时自动生成test.gwt.xml。它说:

<module rename-to="test">

inside test.gw.xml。若我删除“重命名为…”并运行应用程序,GWT插件会给我一个错误。在gwt.xml中,它似乎是必需的。这与文章的“重命名模块”部分相矛盾。为什么我不能删除或重命名

下面是test.gwt.xml:

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
        "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="test2">
    <inherits name='com.google.gwt.user.User'/>
    <entry-point class='com.ibm.temp.client.test'/>
    <servlet path='/testService' class='com.ibm.temp.server.testServiceImpl'/>
</module>

和test.html:

<html>
<head>
    <title>Wrapper HTML for App</title>    
    <link type="text/css" rel="stylesheet" href="test.css">
    <script type="text/javascript" language="javascript" src="com.ibm.temp.test/com.ibm.temp.test.nocache.js"></script>
</head>
<body>    
<h1>Simple Application</h1>    
<div id="input-container"/>    
</body>
</html>

应用程序的包装HTML
简单应用

像这样更改脚本标记。问题是浏览器找不到nocache.js文件。 如果模块重命名为abc,nocache.js将处于war/abc/abc.noacache.js中 如果模块未重命名,它将位于war/full package name的gwt.xml/full package name.nocache.js中

就你的情况而言

 <script type="text/javascript" language="javascript" src="test2/test2.nocache.js"></script> 


我检查过了,没有问题。我使用的是GWTSDK2.5.1和AppEngine 1.7.4。请给出详细的错误,我通常会在这种情况下检查,html的javascript src属性和运行cinfiguration。有时旧值存在。“插件无法连接到127.0.0.1:9997的开发模式服务器”我在chrome中得到了这个!我已经重新安装了好几次这个愚蠢的插件并重新启动了chrome,但它还是坏了。我决定在firefox中检查我的尝试。这是一个更好的方法,但我仍然不明白,它是如何工作的!我在IDEA中创建了默认的GWT应用程序,并将按钮放在onLoadModule中,然后在FF中运行。这很好,而且一切正常。但是如果我更改“重命名为=“另一个名称”并启动应用程序,我只能看到欢迎文本,页面上没有我的按钮……为什么?我使用的是“GWT-2.5.1”,而不是应用程序引擎在战争中创建html页面,并使用脚本(如果未指定重命名,则完整的_packname.nocache.js将是js)并访问该页面,如下面的更改脚本标记