團隊衝刺第五天

個人計劃已經完成一半了,今天的工做是和隊友一塊兒測試整合。
在整合過程當中,我發現每一個手機的適配都不同,後續還要改一下。


html

package Servlet;java

import java.io.IOException;
import java.io.PrintWriter;json

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;測試

import dao.dao;
import entity.Book;
import entity.Bookshelf;
import net.sf.json.JSONObject;code

public class DeleteBookshelfServlet extends HttpServlet {htm

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
    response.setContentType("text/html; charset=utf-8");
    String username=request.getParameter("username");
    String bookname =request.getParameter("BookName");
    Bookshelf bookshelf =new Bookshelf(bookname,username);
    dao dao =new dao();
    PrintWriter out = response.getWriter();
    JSONObject json=new JSONObject();
    if(dao.deleteshelf(bookshelf)) {
        json.put("result", 1);
        out.print(json);
    }else {
        json.put("result", 0);
        out.print(json);
    }
}


protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    // TODO Auto-generated method stub
    doGet(request, response);
}

}blog

DeleteBookshelfServletutf-8

相關文章
相關標籤/搜索