zoukankan      html  css  js  c++  java
  • 第一个Hibernate 程序

    使用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>
  • 相关阅读:
    PHP使用Redis的GEO地理信息类型
    Redis长短链接的区别
    Linux之ln文件创建链接
    xml与json格式互转
    爬虫实例:唐诗宋词爬虫
    爬虫实例:天猫商品评论爬虫
    爬虫实例:饿了么爬虫
    爬虫实例:中国日报高频词汇爬虫
    爬虫实例:今日头条爬虫
    特殊类型的列表切片
  • 原文地址:https://www.cnblogs.com/fickleness/p/3152568.html
Copyright © 2011-2022 走看看