我在使用GWT-Grails插件时遇到了麻烦。我尝试完全按照此示例进行操作,但最终出现此错误:
| Error 2012-10-28 00:25:49,567 [http-bio-8080-exec-2] ERROR resource.ResourceMeta - Resource not found: /gwt/g3wt.Application/g3wt.Application.nocache.js
输入以下命令后出现此错误:(我只是遵循本指南here)
>grails create-app g3wt
>cd g3wt
>grails install-plugin gwt
>grails create-gwt-module g3wt.Application
>grails create-gwt-page main/index.gsp g3wt.Application
>grails run-app
>grails run-gwt-client
这是index.gsp代码(无论如何都会自动生成):
<html>
<head>
<!-- Integrate with Sitemesh layouts -->
<meta name="layout" content="main" />
<!-- -->
<!-- Any title is fine -->
<!-- -->
<title>Example title (change this!)</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" src="${resource(dir: 'gwt/g3wt.Application', file: 'g3wt.Application.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>
<!-- OPTIONAL: include this if you want history support -->
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
<!-- Add the rest of the page here, or leave it -->
<!-- blank for a completely dynamic interface. -->
</body>
</html>
我知道找不到nocache.js,所以我想我可以尝试看看它到底在哪里。但是,使用eclipse搜索功能,它表明根本没有创建该文件。尽管有一个名为application.js的文件。
为什么未创建nocache.js,我该如何解决?我已经很困惑了一段时间,这很令人沮丧。
我正在使用gwt插件0.7.1和grails 2.1.1,以及Eclipse 4.2和Linux计算机。
最佳答案
我遇到了同样的问题,发现了answer here.buildconfig.groovy
在conf文件夹中。只需注释掉运行时为“:resouces ...”的插件即可
关于gwt - GWT grails插件错误resource.ResourceMeta-找不到资源:%nocache.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13102177/