?? modifychannel.java
字號:
/*
* Created on 2005-12-9
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.mycompany.servlet;
import java.io.IOException;
import java.net.URLEncoder;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mycompany.news.dto.Channel;
import com.mycompany.news.service.ChannelService;
/**
* @author Administrator
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class ModifyChannel extends HttpServlet {
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Long channelid= Long.valueOf( request.getParameter("channelid"));
String channelName = request.getParameter("channelName");
Integer channelOrder=Integer.valueOf(request.getParameter("channelOrder"));
Channel channel = new Channel();
channel.setChannelID(channelid);
channel.setChannelName(channelName);
channel.setChannelOrder(channelOrder);
channel.setChannelStatus(new Integer(0));
ChannelService cs = new ChannelService();
if(cs.updateChannel(channel))
response.sendRedirect(request.getContextPath()+"/opsucc.jsp?message="+URLEncoder.encode(cs.getMessage(),"GB2312"));
else
response.sendRedirect(request.getContextPath()+"opfail.jsp?message="+URLEncoder.encode(cs.getMessage(),"GB2312"));
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -