MoveToServlet.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:1k
源码类别:

WEB邮件程序

开发平台:

Java

  1. package com.softeem.webmail.sendbox;
  2. import java.io.IOException;
  3. import java.io.PrintWriter;
  4. import javax.servlet.ServletException;
  5. import javax.servlet.http.HttpServlet;
  6. import javax.servlet.http.HttpServletRequest;
  7. import javax.servlet.http.HttpServletResponse;
  8. public class MoveToServlet extends HttpServlet {
  9. public void doGet(HttpServletRequest request, HttpServletResponse response)
  10. throws ServletException, IOException {
  11. this.doPost(request, response);
  12. }
  13. public void doPost(HttpServletRequest request, HttpServletResponse response)
  14. throws ServletException, IOException {
  15. response.setContentType("text/html");
  16. request.setCharacterEncoding("GBK");
  17. request.getAttribute("id");
  18. String id = request.getParameter("id");
  19. String []str = id.split("/");
  20. for (String stri : str) {
  21. MoveToLaji mt = new MoveToLaji();
  22. mt.moveToLaji(Integer.parseInt(stri),"laji");
  23. }
  24. response.sendRedirect("sendbox.jsp");
  25. }
  26. }