www.pudn.com > Jsp-Blog.rar > LogAdminServlet.java, change:2010-05-25,size:1020b


package myblog.servlet; 
 
import java.io.IOException; 
import java.util.ArrayList; 
 
import javax.servlet.ServletException; 
import javax.servlet.http.HttpServlet; 
import javax.servlet.http.HttpServletRequest; 
import javax.servlet.http.HttpServletResponse; 
 
import myblog.dao.LogAdminDao; 
import myblog.entity.Logs; 
 
public class LogAdminServlet extends HttpServlet { 
 
	public void doPost(HttpServletRequest request, HttpServletResponse response) { 
		String logid = request.getParameter("logid"); 
		LogAdminDao logAdmin = new LogAdminDao(); 
		ArrayList<Logs> list = new ArrayList<Logs>(); 
		list = logAdmin.selectLog(logid); 
		request.setAttribute("loglist",list); 
		try { 
			request.getRequestDispatcher("modifylog.jsp").forward(request, 
					response); 
		} catch (ServletException e) { 
 
			e.printStackTrace(); 
		} catch (IOException e) { 
 
			e.printStackTrace(); 
		} 
	} 
 
	public void doGet(HttpServletRequest request, HttpServletResponse response) { 
		doPost(request, response); 
	} 
}