2014年1月7日星期二

A multiple ajax request a JSP problem ACTION multiple methods

Submitted an ajax request in a JSP page in a method ACTION returned data , and then click submit ACTION ajax request in a second method , then Baocuo Neither getCity () nor it's doXxx () equivalent is defined in action class com.inspur.xxx.action.xxAction. ask how to solve . First contact. No problem there first request data is returned .
------ Solution ---------------------------------------- ----
your first time does not change action, on the request of the default action of the treatment is no problem , and then a second time to change the action of the treatment method of error bars , the two barely look at this , Last night broke a demo, but also wrong, in debugging .
------ For reference only ---------------------------------------
you are using a servlet it, you servlet which defines the getCity way? Each action request is a different approach , then it define multiple servlet to handle it.
------ For reference only -------------------------------------- -
useless SERVLET using XWORK
------ For reference only --------------------------- ------------
with js, ajax has nothing directly to individual requests test method should be no definition
------ For reference only ------- --------------------------------
is an action which defines several methods, and then go to the dynamic a request to change the approach it ?
------ For reference only -------------------------------------- -
yes. The first request is no problem , and the second on Baocuo .
------ For reference only -------------------------------------- -
Oh, no request to the second method , you throw wrong , ACTION is the same .
------ For reference only -------------------------------------- -
  The reply was deleted administrator at 2014-01-07 11:30:48

------ For reference only ---------------------------------- -----
can you put out a few ajax the url see it
------ For reference only ----------------- ----------------------
get, is my stupid , hurry , is to visit ACTION second method parameters , parameter is not SETGET . Really depressed.

没有评论:

发表评论