?? modifychatroomdo.java
字號:
package com.lovo.servlet;
import java.io.IOException;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.lovo.factory.BOFactory;
import com.lovo.po.ChatroomPO;
import com.lovo.vo.ChatroomVO;
public class ModifyChatroomDO extends HttpServlet{
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
this.doPost(request, response);
}
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=utf-8");
response.setCharacterEncoding("utf-8");
String idStr = request.getParameter("id");
String name = request.getParameter("name");
String maxUserNumStr = request.getParameter("maxusernum");
int id = Integer.parseInt(idStr);
int maxUserNum = Integer.parseInt(maxUserNumStr);
ChatroomVO chat = new ChatroomVO();
chat.setId(id);
chat.setMaxUserNum(maxUserNum);
chat.setName(name);
try {
BOFactory.getChatroomBOInstance().modify(chat);
response.sendRedirect("QueryChatroomDO");
return;
} catch (SQLException e) {
e.printStackTrace();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -