java - Transfer object parameters between controllers -
i have 2 methods inside controller:
@controller @requestmapping("/feed") public class feedbackcontroller extends baseaccountcontroller { @requestmapping("/reply") public modelandview replymsg(feedback temp,modelmap modelmap,httpservletrequest request,httpservletresponse response) { ................ feedback fb = new feedback(); fb.setproductid(temp.getproductid()); view.setviewname("redirect:/feed/list.do"); view.addobject("feedback",fb); return view; } @requestmapping("/list") public string list(feedback feedback, modelmap map, httpservletrequest request) { ...... integer productid = feedback.getproductid();//check if feedback object transferred return "/feedback/list"; // .jsp or .ftl file. } }
feedback simple java bean.i want transfer object replymsg() list().
but result is: yes,the functioin forwarded list(), feedback.getproductid().it means list() doesn't feedback object replymsg();
after change view.setviewname("redirect:/feed/list.do"); view.setviewname("forward:/feed/list.do"); , doesn't work.
so , tell me can do? new java front end;
Comments
Post a Comment