springmvc页面跳转实现

	@RequestMapping("/index1")
	public void index(HttpServletResponse resp) throws Exception{
		resp.sendRedirect("index.html");
	}

上面这种办法是HttpServletResponse重定向。

要求是,必须是url路径同一层的,如果url是sys/index1,那么index.html页面必须是在sys文件夹下面。

发布了58 篇原创文章 · 获赞 1 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/zh_chong/article/details/103028167
今日推荐