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


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.ShowUserInforDao; 
import myblog.entity.Users; 
 
public class ShowUserInforServlet extends HttpServlet { 
 
	public void doPost(HttpServletRequest request, HttpServletResponse response) { 
		String username = request.getSession().getAttribute("username") 
				.toString(); 
		ShowUserInforDao show = new ShowUserInforDao(); 
		ArrayList<Users> list = show.showUserInfor(username); 
		request.setAttribute("showUserList", list); 
		try { 
			request.getRequestDispatcher("usermodify.jsp").forward(request, 
					response); 
		} catch (ServletException e) { 
 
			e.printStackTrace(); 
		} catch (IOException e) { 
 
			e.printStackTrace(); 
		} 
	} 
 
	public void doGet(HttpServletRequest request, HttpServletResponse response) { 
		doPost(request, response); 
	} 
}