jquery ajax配合SpringMVC实现局部刷新DIV

feedback.jsp:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	String imgPath = request.getParameter("imgPath") == null ? ""
			: request.getParameter("imgPath").toString().trim();
	System.out.println(imgPath);
%>











反馈信息





















	
	

	 
邮箱地址 设备ID 电话号码 正文 时间
${utcFeedback.email } ${utcFeedback.deviceId } ${utcFeedback.phoneNo } ${utcFeedback.content } ${utcFeedback.opTimer }
首页     上一页     首页     上一页     下一页     末页     下一页     末页     当前第${page.pageNo}页     共${page.totalPage}页     共${page.totalCount}条数据    


conroller(具体DAO和Page类省略):

/**
	 * 显示不同页码的反馈信息
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value="/queryFeedBackInfo")
	public ModelAndView queryFeedBackInfo(HttpServletRequest request,HttpServletResponse response)throws Exception{
		UtcFeedbackDao utcFeedbackDao = new UtcFeedbackDao();
		int currentPage = request.getParameter("pageNo")==null?1:request.getParameter("pageNo").toString().trim()==""?1:Integer.parseInt(request.getParameter("pageNo").toString().trim());
		Pagination page = null;//分页帮助类
		page = utcFeedbackDao.findByCondition(currentPage,pagesize);
		
		HashMap map = new HashMap();
	    map.put("page", page);
		return new ModelAndView("app/temp",map);
	}

temp.jsp:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>





My JSP 'temp.jsp' starting page











	
			
邮箱地址 设备ID 电话号码 正文 时间
${utcFeedback.email } ${utcFeedback.deviceId } ${utcFeedback.phoneNo } ${utcFeedback.content } ${utcFeedback.opTimer }
首页     上一页     首页     上一页     下一页     末页     下一页     末页     当前第${page.pageNo}页     共${page.totalPage}页     共${page.totalCount}条数据    



你可能感兴趣的:(jquery,ajax局部刷新)