【发布时间】:2017-11-03 05:31:05
【问题描述】:
in WEB-INF having a Jsp File pls see image 我正在使用带有 Hibernate 数据库连接的 Spring mvc,在我的控制器中,我的控制器中有来自变量 val 的数据库中的数据,现在我如何使用数据重定向到另一个 jsp 页面
控制器部分:
@RequestMapping(value = "/EditShop" , method = RequestMethod.POST)
public String editShop(HttpServletRequest request,HttpServletResponse response) throws IOException
{
String id=request.getParameter("Id");
try
{
String val=shopService1.editShopinfo(id);
System.out.println("Edit Shop : "+val);
}
catch(Exception e)
{
System.out.println("Edit Shop : "+e );
}
return "redirect:/EditShop.jsp";
}
【问题讨论】:
标签: java spring spring-mvc spring-boot