Administrator Mode

Spring mvc 's modelandview 's address doesn't exist at all, and why is it.

126 5

@ requestmapping ( value ="/add", method = RequestMethod. Post ).

public ModelAndView add(HttpServletRequest request,
 HttpServletResponse response, zqbp_custom item) {
 ConnectionSource connectionSource = DBUtil.getConnectionSource();
 try {
 String []a=item.getCustom_address().split(",");
 String aa="";
 for(int i=0;i<a.length;i++){
 if(Integer.parseInt(a[i])!=-1){
 if(a[i]!=null){
 if(i!=4){
 Dao<t_prov_city_area_street, String> dao = DaoManager.createDao(connectionSource,
 t_prov_city_area_street.class);
 t_prov_city_area_street t=dao.queryForId(a[i]);
 aa+=t.getName();
 }else{
 aa+=a[i];
 }
 }
 }
 }
 Dao<zqbp_custom, String> dao = DaoManager.createDao(connectionSource,
 zqbp_custom.class);
 item.setCustom_id((UUID.randomUUID().toString().replaceAll("-","")));
 item.setStatus("0");
 item.setCustom_address(aa);
 item.setCustom_trade("3");
 dao.create(item);
 connectionSource.close();
 } catch (SQLException e) {
 return jsonError(request,"保存失败!!","");
 }
 return jsonSuccess(request,"保存成功!", getBasePath(request)
  • "admin/custom/index. Html").

    }

    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    The correct address of modelandview should be the admin custom index. Jsp".
    It's definitely not a cache problem.

1 Answers

131 4

The last. Html is the same as jsp.

...