Jsp+Servlet+JavaBean+JDBC登陆实例
运行环境:
引用
JDK1.5
Tomcat5.5
MyEclips5.5.1 GA
SqlServer2000
windows2003
1.在SqlServer下的查询分析器中新建表:
- create table dbuser(  
 - userId int identity(1,1) primary key not null,  
 - userName varchar(50),  
 - userPasswd varchar(50))  
 
 
2.在MyEclipse中新建Web工程,并创建包结构。
3.编写登陆界面。
- <%@ page language="java" contentType="text/html; charset=GB18030"  
 -     pageEncoding="GB18030"%>  
 - <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
 - <html>  
 - <head>  
 - <meta http-equiv="Content-Type" content="text/html; charset=GB18030">  
 - <title>Insert title here</title>  
 - <style type="text/css">  
 - body{  
 -  color : #000 ;  
 -  font-size : 12px ;  
 -   
 -  margin : 0px aut