我有一个grails应用程序(grails-2.4.4)。我使用 grails war 命令创建一个war文件。战争文件结构:
1. /css
...
2. /images
...
3. /js
/prototype
....
application.js
4. META-INF
...
5. WEB-INF
...
我可以成功地在GlassFish4上部署战争并运行应用程序。但索引页面显示不正确,因为页面资源中没有原型文件夹(及其js文件)。只需 application.js 。
答案 0 :(得分:1)
确保为Grails安装了 prototype-plugin 。
来自Grails plugin page:
从Grails 2.0开始,Prototype不再是默认的JavaScript库 (改为使用jQuery)。这个插件允许旧的应用程序 通过卸载jQuery插件继续使用Prototype 安装这个。
请参阅https://github.com/gpc/grails-prototype了解来源和用法 信息