JSPʵÏֵǽ½çÃæµ½×¢²áÒ³ÃæÌø×ª - Java / Web ¿ª·¢
СµÜѧOracle¿Î³ÌÉè¼ÆÐèÒª×ÔѧJSP
Ïë×öÒ»¸öµÇ½½çÃæ£¬´ÓÊý¾Ý¿âÖжÁÈ¡Óû§ÃûºÍÃÜÂ룬Èç¹ûÓû§ÃûºÍÃÜÂë¶¼ÕýÈ·£¬ÔòÌø×ªµÄadminÒ³Ãæ»òÕßreaderÒ³Ãæ
Èç¹ûûÓÐÓû§Ãû
Ö±½Óµã¡°×¢²á¡±°´Å¥£¬¾Í¿ÉÒÔÌø×ªµÄ×¢²áÒ³Ãæ£¬ÇëÎÊÕâ¸öÔõôʵÏÖÄØ£¿
Ì«ÄÛµÄÎÊÌ⣬´ó¼Ò²»ÒªÐ¦¹þ
ÓøöservletÌø×ª°É£¡ÔÚservletÖÐÅжϣ¡
Õâ¸ö±È½Ï¼òµ¥
ÈôÓû§ÃûΨһ
String admin = request.getParameter("user");
String pass = null;
int num = 0;
rs=stmt.executeQuery("select pass from admin where user="+user);
while(rs.next()){
pass = rs.getString(1);
num=1;
}
if(num == 1){
response.sendRedirect("admin.jsp");
}else{
response.sendRedirect("login.jsp");//Ìø×ªµ½×¢²áÒ³Ãæ
}
Õâ¸öºÜ¼ò½à.! LZÈç¹ûûÓÐʲô̫¶àµÄÒªÇó,¾ÍÓÃÕâ¸ö¾Í¹»ÁË
Ö§³Ö¶þÂ¥
LZ ˵µÄ¶¼ÊʺϳõѧÕß ÎҾͲ
Ïà¹ØÎÊ´ð£º
±¾ÈËÕýÔÚÓÃJava×öÒ»¸öC/S¼Ü¹¹µÄÏîÄ¿£¬
¿ÉÊÇÓÉÓÚÏîÄ¿±È½Ï´ó£¬Ç°ÆÚ¶Ô¼Ü¹¹µÄÉè¼ÆÓÈÆäÖØÒª£¬ÒòΪºóÆÚ¿ÉÄÜËæÊ±»á¼Ó¸ö¹¦ÄÜ»òÕßÈ¥µôijЩ¹¦ÄÜ¡£
ËùÒÔÌØµØÑ°ÇóÈçºÎÉè¼ÆC/SµÄ¼Ü¹¹Ê¹³ÌÐò¸ü¼ÓÃæÏò¶ÔÏó¸ü¼ÓÒ×ÓÚά ......
ÇëÎÒÓÃFCKÉÏ´«Îļþ,ÔÚ±¾µØµÄwindows»úÉϲâÊÔ¿ÉÒÔ£¬µ«²¿Êðµ½linux·þÎñÆ÷ÉϾÍÉÏ´«²»ÁËÎļþ£¬ÉÏ´«Îļþʱһֱ¿¨ÔÚÄÇÀï¡£Íû¸÷λ´óϺָµã£¬Ð»Ð»£¡
·¹ý£¬°ïÄ㶥һϡ£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
ÉÏ´«ÎļþµÄ·¾¶ÎÊÌ⣬ ......
ÎÒÊǸöÐÂÊÖ£¬Íû¸ßÊÖ½â´ð
ÎÒÏÖÔÚÒѾ°²×°ÁËmysql£¬Ò²ÓÐmysqlµÄjdbc¡£µ«ÎÒÔõôÅäÖú󣬲ÅÄÜÔÚMyEclipseÀï²Ù×÷mysqlÄØ£¿Çë¸ßÊÖ˵Ïêϸµã
´ò¿ªMyeclipse----window---open perspective---MyEclipse database explorer-- ......