MoveToServlet.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:1k
- package com.softeem.webmail.sendbox;
- import java.io.IOException;
- import java.io.PrintWriter;
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- public class MoveToServlet extends HttpServlet {
- public void doGet(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- this.doPost(request, response);
- }
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- response.setContentType("text/html");
- request.setCharacterEncoding("GBK");
- request.getAttribute("id");
- String id = request.getParameter("id");
- String []str = id.split("/");
- for (String stri : str) {
- MoveToLaji mt = new MoveToLaji();
- mt.moveToLaji(Integer.parseInt(stri),"laji");
- }
- response.sendRedirect("sendbox.jsp");
- }
- }