Package Com.po;public class Users {private String username;private string Password;public Users () {}public string Getusern Ame () {return username;} public void Setusername (String username) {this.username = username;} Public String GetPassword () {return password;} public void SetPassword (String password) {this.password = password;}}
<%@ page language= "java" import= "java.util.*" contenttype= "text/html"; Charset=utf-8 "%><%@ page import=" com.po.Users "%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
login.jsp<%@ page language= "java" import= "java.util.*" contenttype= "text/html"; Charset=utf-8 "%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
dologin.jsp<%@ page language= "java" import= "java.util.*" contenttype= "text/html"; Charset=utf-8 "%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >testscope.jsp<%@ page language= "java" import= "java.util.*" contenttype= "text/html"; Charset=utf-8 "%><%@ page import=" com.po.Users "%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
The JavaBean of JSP