Search in sources :

Example 1 with TempDao

use of com.zyf.dao.TempDao in project HeartWatchdogJsp by Viczyf.

the class TempServlet method tendTemp.

public void tendTemp(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    TempDao tempdao = new TempDao();
    HttpSession session = request.getSession();
    // 获取用户对象
    User user = (User) session.getAttribute("user");
    int uid = user.getUid();
    List tempList = tempdao.queryTemp(uid);
    List tempMaxList = tempdao.queryMaxTemp(uid);
    request.setAttribute("tempList", tempList);
    request.setAttribute("tempMaxList", tempMaxList);
    RequestDispatcher rd = request.getRequestDispatcher("temptend.jsp");
    rd.forward(request, response);
}
Also used : User(com.zyf.bean.User) TempDao(com.zyf.dao.TempDao) HttpSession(javax.servlet.http.HttpSession) List(java.util.List) RequestDispatcher(javax.servlet.RequestDispatcher)

Aggregations

User (com.zyf.bean.User)1 TempDao (com.zyf.dao.TempDao)1 List (java.util.List)1 RequestDispatcher (javax.servlet.RequestDispatcher)1 HttpSession (javax.servlet.http.HttpSession)1