問一下在struts2中獲取ext,或者dojo 的數據出現了異常?這是怎麼回事情?

問一下在struts2中獲取ext,或者dojo 的數據出現了異常?這是怎麼回事情?
我的客戶端:

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', ]




在提交的數據中沒有問題呀;怎麼回出現這個問題,如何解決???
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章