使用MyEclipse建立Hibernate工程

index页面的Jsp源文件

<%@ page language="java" import="java.util.*" pageEncoding="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">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
  </head>
  
  <body>
    This is my JSP page. <br>
  </body>
</html>

login页面

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
用户登陆 
    <form method="post" action="servlet/LoginServlet" >
    用户名:<input type= "text" size="30" name ="userName"  ><br>
    密码:<input  type = "password"  size="30"  name = "userPassword">

  <input type="submit" value="登陆" >
    </form>
</body>
</html>

register页面

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body> 
用户注册 
    <form method="post" action="servlet/RegistServlet" style= "">
    用户名:<input type= "text" size="30" name ="userName"  ><br>
    密码:<input  type = "password"  size="30"  name = "userPassword"><br>
  E-mail :<input type = "text"  size="30"  name = "userEmail"><br>
  <input type="submit" value="注册" >
    </form>

</body>
</html>

 

相关文章:

  • 2021-05-21
  • 2021-10-22
  • 2022-12-23
  • 2021-12-26
  • 2022-02-13
  • 2021-07-30
  • 2021-08-26
猜你喜欢
  • 2022-01-19
  • 2021-08-12
  • 2022-02-28
  • 2022-01-21
  • 2022-03-07
  • 2021-04-17
相关资源
相似解决方案