问题描述
用Ext做了一个上传的窗口,点击上传按钮后,firebug报如下错误:missing ) in parenthetical(<h1>HTTP Status 500 - </h1><hr noshad...lfilling this request.</u></p><p><b>ex ext-all-debug.js (第 12434 行)后台也获取不到任何数据,只有上传的进度条不停地走,请大家帮忙看一下哪儿有问题(附页面截图)。下面是js代码Ext.ns('Flow.deployProcess');Flow.deployProcess = function(){ return {getForm: function(){var processPanel = new Ext.form.FormPanel({id: 'processDefinition',title: '上传流程文件',frame: true,lableWidth: 70,bottonAlign: 'center',defaults: {allowBlank: false},fileUpload: true,items:[ { xtype: 'textfield', inputType: 'file', //fieldLable: '上传流程文件', name: 'process', id: 'processName', margins: '50 0 0 0' } ],buttons:[{text:'上传',handler: function(){if(Ext.fly('processName').dom.value ==null || Ext.fly('processName').dom.value == ""){Ext.Msg.alert('信息','请选择要部署的流程文件');return false;}var form = processPanel.getForm();if(form.isValid()){form.doAction('submit', { url : 'deployProcess.action', method : 'post', waitTitle:"请稍候", waitMsg : '正在上传...', success : function(form,action){ Ext.Msg.alert('信息',action.result.resultMap.message); }, failure : function(form,action){ Ext.Msg.alert('信息',action.result.resultMap.message); }, scope : this }); } } }, {text: '重置', handler: function() { processPanel.getForm().reset();}, scope: this} ]});return processPanel;},getDialog: function(id) {var panel = Ext.getCmp(id);var form = this.getForm(); var dlg = new Ext.Window({ id: 'uploadDialog', renderTo: panel, width: 400, height: 300, title: '', plain: true, closable: true, resizable: false, frame: true, layout: 'fit', closeAction: 'hide', border: false, modal: true, items: [form] }); //dlg return dlg; },render: function(id){ if (!this.dlg) { this.dlg = this.getDialog(id); this.dlg.show(); }; }};}; 问题补充:yqin 写道
解决方案
看看jar包 都引了吗 commons-logging-1.1.jarfreemarker-2.3.8.jarognl-2.6.11.jarstruts2-core-2.0.6.jarxwork-2.0.1.jarcommons-io-1.3.1.jarcommons-fileupload-1.2.jar
解决方案二:
服务器返回数据类型设为text/html. Response. setContentType("text/html; charset=utf-8");