200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > springmvc怎样只跳转页面 – CSS – 前端 css3半透明div

springmvc怎样只跳转页面 – CSS – 前端 css3半透明div

时间:2020-01-19 13:11:49

相关推荐

springmvc怎样只跳转页面 – CSS – 前端 css3半透明div

在spring mvc中实现在Controller中进行页面跳转有两种方式

1.Java代码

public ModelAndView login(HttpServletResponse response, String id) {

response.sendRedirect("index.do="+id);

return null;

}

public ModelAndView login(HttpServletResponse response, String id) {

response.sendRedirect("index.do="+id);

return null;

}

2.Java代码

public ModelAndView login(HttpServletResponse response, String id) {

return new ModelAndView("redirect:index.do="+id);

}

public ModelAndView login(HttpServletResponse response, String id) {

return new ModelAndView("redirect:index.do="+id);

}

return new ModelAndView("redirect:" + downloadUrl);

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。