如果您有一个链接为
<a id="screenId" href="#">
然后添加
<div id="container"></div>您想要的页面的地方,还有一个js函数,
$('#screenId').click(function() { $.ajax({ type: "GET", cache: false, url: "yourControllerURL", data: "", success: function(response){ $('#container').html(response); } });});通过上面的ajax调用,在控制器内部,使用命令对象返回jsp。控制器代码可能看起来像这样。
@RequestMapping(value="yourControllerURL") public String includeAnotherJSP(ModelMap model) { model.addAttribute("commandObjectName", commandObject); return "yourJSPMapping/jspName";}控制器发送响应后,您将在响应中获取所需的JSP,然后可以
<div id="container">使用上述js代码将其加载到您的JSP中。



