/** * Destruction of the servlet. <br> */ publicvoiddestroy(){ super.destroy(); // Just puts "destroy" string in log // Put your code here }
/** * The doGet method of the servlet. <br> * * This method is called when a form has its tag value method equals to get. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred */ publicvoiddoGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); ShopService ss=new ShopService(); UserService us=new UserService(); String jsp=""; Template tpl=null; String pageNoTem=request.getParameter("page") ; Integer pageNo=0; if(pageNoTem!=null){ pageNo=Integer.parseInt(pageNoTem); }else{ pageNo=1; } String pageSizeTem=CommonUrl.getValue("user_page"); Integer pageSize=Integer.parseInt(pageSizeTem); List<Aunt> auntList=null; List<Comment> commetnList=null; Aunt aunt=null; Integer sum=0; String tem_aunt_id=request.getParameter("aunt_id"); Integer aunt_id=0; if(tem_aunt_id!=null && !tem_aunt_id.equals("")){ aunt_id=Integer.parseInt(tem_aunt_id); } try { tpl =us.getTemplate(); auntList=ss.getAuntList(pageNo, pageSize, null); sum=ss.getAuntCount(null);
/** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to post. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred */ publicvoiddoPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet( request, response); }
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ publicvoidinit()throws ServletException { // Put your code here }
/** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to post. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred */ publicvoiddoPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */ publicvoidinit()throws ServletException { // Put your code here }
/** * Constructor of the object. */ publicPcUserMoney(){ super(); }
/** * Destruction of the servlet. <br> */ publicvoiddestroy(){ super.destroy(); // Just puts "destroy" string in log // Put your code here }
/** * The doGet method of the servlet. <br> * * This method is called when a form has its tag value method equals to get. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @throws IOException if an error occurred */ publicvoiddoGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); ShopService ss=new ShopService(); StatisticsService statis=new StatisticsService(); HttpSession session = request.getSession(true); Object ordinary_user=session.getAttribute("ordinary_user"); User user=null; if(ordinary_user==null){//非登陆用户 RequestDispatcher rd = request.getRequestDispatcher("/template/default/page/user_login.jsp"); rd.forward(request,response); }else{//登陆用户 user=(User)ordinary_user; List<OrderMoneyRecord> recordList=null; Integer sum=0; String pageNoTem=request.getParameter("page") ; Integer pageNo=0;