我想从tomcat服务器测试我的应用程序,所以我将我的应用程序ext js放在我的webapp文件夹中,并在web.xml文件中编写了index.html的正确路径。我也像这样修改了我的app.json:
"js": [
{
"path": "/application/app.js",
"bundle": true
}
],
"css": [
{
"path": "/application/bootstrap.css",
"bootstrap": true
}
],
现在app.js正确加载但是当我启动应用程序时,我从firebug控制台收到此消息:
TypeError:Ext.onReady不是函数。
我认为ext js框架没有加载,但我不知道为什么。我应该更改任何配置文件吗? 我使用sencha cmd来构建我的应用程序。
编辑1 :网络控制台
编辑2 :这是我的目录树
应用程序目录位于webapp目录中。
我的欢迎文件列表conf。在我的web.xml文件中:
<welcome-file-list>
<welcome-file>application/index.html</welcome-file>
</welcome-file-list>
编辑3 : 在启动我的服务器之前,我运行“sencha app build”命令。
这是他的日志:
Sencha Cmd v5.0.1.231[INF] Processing Build Descriptor : default
[INF] Loading app json manifest...
[INF] Writing content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/bootstrap.js
[INF] Writing content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/bootstrap.json
[WRN] C1014: callParent has no target (this.callParent in Ext.form.field.Picker.onOtherFocus) -- D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\ext\src\form\field\Picker.js:325
[WRN] C1014: callParent has no target (me.callParent in Ext.form.field.Tag.mimicBlur) -- D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\ext\src\form\field\Tag.js:1298
[WRN] C1014: callParent has no target (me.callParent in Ext.grid.plugin.RowEditing.startEditByClick) -- D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\ext\src\grid\plugin\RowEditing.js:278
[WRN] C1014: callParent has no target (this.callParent in Ext.rtl.selection.CellModel.doMove) -- D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\ext\src\rtl\selection\CellModel.js:12
[WRN] C1014: callParent has no target (this.callParent in Ext.rtl.selection.TreeModel.onKeyLeft) -- D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\ext\src\rtl\selection\TreeModel.js:16
[WRN] C1014: callParent has no target (this.callParent in Ext.rtl.selection.TreeModel.onKeyRight) -- D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\ext\src\rtl\selection\TreeModel.js:8
[WRN] C1014: callParent has no target (this.callParent in Ext.ux.TabCloseMenu.onBeforeDestroy) -- D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\ext\src\ux\TabCloseMenu.js:83
[INF] Compressing data with YuiJavascriptCompressor
[INF] Concatenating output to file D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\build\production\Eloi\app.js
[INF] merging resources into D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\build\production\Eloi\resources
[INF] merged 0 resources into D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\build\production\Eloi\resources
[INF] merging resources into D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\build\production\Eloi\resources
[INF] merged 0 resources into D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\build\production\Eloi\resources
[INF] writing sass content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/temp/production/Eloi/sass/Eloi-all.scss.tmp
[INF] appending sass content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/temp/production/Eloi/sass/Eloi-all.scss.tmp
[INF] appending sass content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/temp/production/Eloi/sass/Eloi-all.scss.tmp
[INF] executing compass using system installed ruby runtime
unchanged Eloi-all.scss
[INF] writing sass content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/temp/production/Eloi/slicer-temp/Eloi-example.scss.tmp
[INF] executing compass using system installed ruby runtime
unchanged Eloi-example.scss
[INF] Writing content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/sass/example/bootstrap.json
[INF] Writing content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/sass/example/bootstrap.js
[INF] Capturing theme image
[INF] Capture complete
[INF] Slicing images...
[INF] Slicing complete - generated 320 images
[INF] Copying page resources to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application\build\production\Eloi
[INF] Generating file deltas to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/production/Eloi/deltas
[INF] Writing content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/production/Eloi/app.json
[INF] Writing content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/production/Eloi/microloader.js
[INF] Appending content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/production/Eloi/microloader.js
[INF] Building output markup to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/production/Eloi/index.html
[INF] Writing content to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/production/Eloi/index.html
[INF] generating cache manifest to D:\eclipse-workspace\Eloi_extJS\eloi-web\src\main\webapp\application/build/production/Eloi/cache.appcache
答案 0 :(得分:1)
我终于找到了解决方案。事实上,sencha cmd 5.0.1.231不起作用。它需要更新到版本5.0.1.250(测试版)并且可以正常工作。
为了它的工作,你必须运行这些命令:
sencha app upgrade
sencha app build
不要忘记在Windows上重新启动cmd,否则cmd始终指向旧版的sencha。