问一下在struts2中获取ext,或者dojo 的数据出现了异常?这是怎么回事情?
我的客户端:
在 struts2的action中代码:
出现了这个错误:
在提交的数据中没有问题呀;怎么回出现这个问题,如何解决???
我的客户端:
function login() {
dojo.xhrGet({
url: "login.htm",
handleAs: "json",
load: function(data){
// dojo.byId('myBox').value = data;
console.debug("success: ", data);
},
error: function(data){
console.debug("An error occurred: ", data);
},
form: "loginFrom"
});
}
dojo.connect(dojo.byId("sub"),"onclick",login);
在 struts2的action中代码:
HttpServletRequest requests=ServletActionContext.getRequest();
System.out.println("UserName :: "+requests.getParameter("UserName"));
出现了这个错误:
2008-11-04 10:52:41,671 [com.opensymphony.xwork2.interceptor.ParametersInterceptor]-[ERROR] ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'Password' on 'class com.fantong.canting.web.action.LoginAction: Error setting expression 'Password' with value ['test', ]
2008-11-04 10:52:41,671 [com.opensymphony.xwork2.interceptor.ParametersInterceptor]-[ERROR] ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'UserName' on 'class com.fantong.canting.web.action.LoginAction: Error setting expression 'UserName' with value ['test', ]
在提交的数据中没有问题呀;怎么回出现这个问题,如何解决???
本文描述了使用Dojo发起AJAX请求到Struts2应用时遇到的问题,包括客户端JavaScript代码及服务器端处理逻辑,并记录了出现的错误信息。
1213

被折叠的 条评论
为什么被折叠?



