新手求救!!!servlet 空白页面
Connection ct=null;
Statement sm=null;
ResultSet rs=null;
try{
//得到用户名和密码
String u=request.getParameter("uname");
String p=request.getParameter("passwd");
//连接数据库
Class.forName("oracle.jdbc.driver.OracleDriver");
ct=DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcl","le","0123456");
sm=ct.createStatement();
rs=sm.executeQuery("select * from users where username='"+u+"' and passwd='"+p+"'");
//判断
if(rs.next()){
//得到session
HttpSession hs=request.getSession(true);
hs.setAttribute("uname",u);
hs.setAttribute("passwd",p);
hs.setMaxInactiveInterval(30);
response.sendRedirect("Wel1?uname="+u);
}else{
response.sendRedirect("Login1");
}
以上是我的代码,麻烦各位大大看看有什么错误,怎么这个代码页是空白的啊,而且源代码也是空白啊