Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 如何在新窗口或选项卡中创建返回的模型和视图页面(jsp)?_Spring_Spring Mvc - Fatal编程技术网

Spring 如何在新窗口或选项卡中创建返回的模型和视图页面(jsp)?

Spring 如何在新窗口或选项卡中创建返回的模型和视图页面(jsp)?,spring,spring-mvc,Spring,Spring Mvc,我想在新窗口或选项卡中创建返回的模型和视图页面(jsp)。随信附上我的密码 @RequestMapping(value = "processDetails") public ModelAndView getProcessDetails(HttpServletRequest request, HttpServletResponse response) { String resourceId = request.getParameter("resourceId"); Syst

我想在新窗口或选项卡中创建返回的模型和视图页面(jsp)。随信附上我的密码

@RequestMapping(value = "processDetails")
    public ModelAndView getProcessDetails(HttpServletRequest request, HttpServletResponse response) {
    String resourceId = request.getParameter("resourceId");
    System.out.println("====resourceId:" + resourceId);
    ModelAndView mv = new ModelAndView("inventory/processDetails");
    List<SoftwareRunning> list4 = inventoryService.getSoftwaresRunning(resourceId);
    mv.addObject("ProcessDetails", list4);
    return mv;
}
@RequestMapping(value=“processDetails”)
公共模型和查看getProcessDetails(HttpServletRequest请求、HttpServletResponse响应){
字符串resourceId=request.getParameter(“resourceId”);
System.out.println(“==resourceId:+resourceId”);
ModelAndView mv=新的ModelAndView(“库存/流程详细信息”);
List list4=inventoryService.getSoftwaresRunning(resourceId);
mv.addObject(“ProcessDetails”,列表4);
返回mv;
}

单靠java是做不到的。打开新选项卡(或窗口)是一个客户端过程。如果要实现这一点,必须使用javascript。但是,您仍然不知道它是否会打开一个新选项卡或一个新窗口。这取决于客户端浏览器的首选项。检查javascript的window.open,参数target设置为_blank。

如何调用
/processDetails
url