SpringMVC+Spring+HIbernate 简单增删改查实例
HIbernate配置mysql数据库的方式 和 Structs+spring+HIbernate 是一样的。
可以理解为SpringMVC 把 Structs2 替代了,SpringMVC 中的 Controller 对应 Structs2 中的 Action,相对来说更加的简单,毕竟少了一个配置文件struts.xml,这个实例中连xx.hbm.xml都用注解的方式代替了
对应页面回显数据,Struts2中,用值栈、session、Request等,SpringMVC中也可以使用Servlet API,session等都可以用,可以用 Map、Model等来回显数据
页面上可以使用JSTL,Struts的 s标签就没了
<s:iterator value="list" var="d">
- 1
<c:forEach var="p" items="${requestScope.personlist }">
- 1
删除和修改都是url中传入id的参数
http://localhost:8080/../doupdate?id=402881e958de29980158de2aa5440000
- 1
项目结构
除了spring和HIbernate基本包还需要加 jstl标签库的jar包
jstl.jar standard.jar
HIbernate c3p0 jar包,
c3p0-0.9.2.1.jar hibernate-c3p0-4.3.11.Final.jar mchange-commons-java-0.2.3.4.jar 3个
对应在hibernate-release-4.3.11.Final\lib\optional\c3p0
目录下mysql数据库连接的jar包
mysql-connector-java-5.1.40-bin.jar
jar包在源码里有
没有使用各层的接口
版本信息
-
Eclipse版本
Neon
.1
a
Release (
4.6
.1)
-
Spring
4.3
.4
-
Hibernate
4.3
.11
-
Tomcat
7.0
-
JDK
1.8
-
数据库
MySQL5
.7
.12
- 1
- 2
- 3
- 4
- 5
- 6
部分源代码
业务层和Dao层没有使用接口(解耦等)
web.xml
web.xml
-
<?xml version="1.0" encoding="UTF-8"?>
-
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
-
<display-name>SpringMVC_Spring_Hibernate
</display-name>
-
-
-
<!-- 防止中文参数乱码 放在前面 -->
-
<filter>
-
<filter-name>SetCharacterEncoding
</filter-name>
-
<filter-class>org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
-
<init-param>
-
<param-name>encoding
</param-name>
-
<param-value>UTF-8
</param-value>
-
</init-param>
-
<init-param>
-
<param-name>forceEncoding
</param-name>
-
<param-value>true
</param-value>
-
<!-- 强制进行转码 -->
-
</init-param>
-
</filter>
-
<filter-mapping>
-
<filter-name>SetCharacterEncoding
</filter-name>
-
<url-pattern>/*
</url-pattern>
-
</filter-mapping>
-
-
<!-- spring 配置Listener-->
-
-
<!-- needed for ContextLoaderListener -->
-
<context-param>
-
<param-name>contextConfigLocation
</param-name>
-
<param-value>classpath:/resources/beans.xml
</param-value>
-
</context-param>
-
-
<!-- Bootstraps the root web application context before servlet initialization -->
-
<listener>
-
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
-
</listener>
-
-
<!-- springmvc配置dispatcherServlet -->
-
-
<!-- The front controller of this Spring Web application, responsible for handling all application requests -->
-
<servlet>
-
<servlet-name>springDispatcherServlet
</servlet-name>
-
<servlet-class>org.springframework.web.servlet.DispatcherServlet
</servlet-class>
-
<init-param>
-
<param-name>contextConfigLocation
</param-name>
-
<param-value>classpath:/resources/springmvc.xml
</param-value>
-
</init-param>
-
<load-on-startup>1
</load-on-startup>
-
</servlet>
-
-
<!-- Map all requests to the DispatcherServlet for handling -->
-
<servlet-mapping>
-
<servlet-name>springDispatcherServlet
</servlet-name>
-
<url-pattern>/
</url-pattern>
-
</servlet-mapping>
-
</web-app>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
实体类
Person.java
-
package com.jxust.svsh.entity;
-
-
import javax.persistence.Column;
-
import javax.persistence.Entity;
-
import javax.persistence.GeneratedValue;
-
import javax.persistence.Id;
-
import javax.persistence.Table;
-
-
import org.hibernate.annotations.GenericGenerator;
-
-
/**
-
* 个人信息实体类
-
* 注解方式配置对应数据表
-
*
@author
Peng
-
*
@Date
2016年12月8日下午2:54:52
-
*/
-
@Entity
-
@Table(name =
"person")
-
public
class Person {
-
-
private String id;
// 主键id
-
private String name;
// 姓名
-
private String idCard;
// 身份证号
-
private String phone;
// 手机号
-
private String address;
// 地址
-
-
public
Person
() {
-
super();
-
}
-
-
public
Person
(String name, String idCard, String phone, String address) {
-
super();
-
this.name = name;
-
this.idCard = idCard;
-
this.phone = phone;
-
this.address = address;
-
}
-
-
@Id
-
@Column(name =
"id", nullable =
false, unique =
true)
-
@GenericGenerator(name =
"generator", strategy =
"uuid")
-
@GeneratedValue(generator =
"generator")
-
public
String
getId
() {
-
return id;
-
}
-
-
public
void
setId
(String id) {
-
this.id = id;
-
}
-
-
@Column(name =
"name", nullable =
false, length =
32)
-
public
String
getName
() {
-
return name;
-
}
-
-
public
void
setName
(String name) {
-
this.name = name;
-
}
-
-
@Column(name =
"idCard", nullable =
false, length =
32)
-
public
String
getIdCard
() {
-
return idCard;
-
}
-
-
public
void
setIdCard
(String idCard) {
-
this.idCard = idCard;
-
}
-
-
@Column(name =
"phone", nullable =
false, length =
32)
-
public
String
getPhone
() {
-
return phone;
-
}
-
-
public
void
setPhone
(String phone) {
-
this.phone = phone;
-
}
-
-
@Column(name =
"address", nullable =
false, length =
32)
-
public
String
getAddress
() {
-
return address;
-
}
-
-
public
void
setAddress
(String address) {
-
this.address = address;
-
}
-
-
@Override
-
public
String
toString
() {
-
return
"Person [id=" + id +
", name=" + name +
", idCard=" + idCard +
", phone=" + phone +
", address="
-
+ address +
"]";
-
}
-
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
Service业务层
PersonService.java
-
package com.jxust.svsh.service;
-
-
import java.util.List;
-
-
import org.springframework.beans.factory.annotation.Autowired;
-
import org.springframework.stereotype.Service;
-
import org.springframework.transaction.annotation.Transactional;
-
-
import com.jxust.svsh.dao.PersonDAO;
-
import com.jxust.svsh.entity.Person;
-
-
@Transactional
-
@Service
-
public
class PersonService {
-
-
@Autowired
-
public PersonDAO personDAO;
-
-
/**
-
* 添加
-
*
@param
person
-
*/
-
public
void
addPerson
(Person person) {
-
personDAO.addPerson(person);
-
}
-
/**
-
* 根据id查询
-
*
@param
id
-
*
@return
-
*/
-
public
Person
getPersonById
(String id){
-
return personDAO.getPersonById(id);
-
}
-
/**
-
* 更新
-
*
@param
person
-
*/
-
public
void
updatePerson
(Person person) {
-
personDAO.updatePerson(person);
-
}
-
/**
-
* 删除
-
*
@param
id
-
*/
-
public
void
deletePersonById
(String id) {
-
personDAO.deletePersonById(id);
-
}
-
/**
-
* 查询所有
-
*
@return
-
*/
-
public
List<Person>
getPersons
() {
-
return personDAO.getPersons();
-
}
-
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
Dao层
PersonDAO.java
-
package com.jxust.svsh.dao;
-
-
import java.util.List;
-
-
import javax.annotation.Resource;
-
-
import org.hibernate.Session;
-
import org.hibernate.SessionFactory;
-
import org.springframework.stereotype.Repository;
-
-
import com.jxust.svsh.entity.Person;
-
-
@Repository
-
public
class PersonDAO {
-
-
@Resource
-
private SessionFactory sessionFactory;
-
-
private
Session
getSession
() {
-
return sessionFactory.getCurrentSession();
-
}
-
/**
-
* 根据id查询
-
*
@param
id
-
*
@return
-
*/
-
public
Person
getPersonById
(String id) {
-
return (Person)
this.getSession().createQuery(
"from Person where id=?").setParameter(
0, id).uniqueResult();
-
}
-
/**
-
* 添加
-
*
@param
person
-
*/
-
public
void
addPerson
(Person person) {
-
this.getSession().save(person);
-
}
-
/**
-
* 更新
-
*
@param
person
-
*/
-
public
void
updatePerson
(Person person) {
-
this.getSession().update(person);
-
}
-
/**
-
* 删除
-
*
@param
id
-
*/
-
public
void
deletePersonById
(String id) {
-
this.getSession().createQuery(
"delete Person where id=?").setParameter(
0, id).executeUpdate();
-
}
-
/**
-
* 查询所有
-
*
@return
-
*/
-
@SuppressWarnings(
"unchecked")
-
public
List<Person>
getPersons
() {
-
return
this.getSession().createCriteria(Person.class).list();
-
}
-
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
Controller
PersonController.java
-
package com.jxust.svsh.controller;
-
-
import java.util.Map;
-
-
import org.springframework.beans.factory.annotation.Autowired;
-
import org.springframework.stereotype.Controller;
-
import org.springframework.ui.Model;
-
import org.springframework.web.bind.annotation.RequestMapping;
-
import org.springframework.web.bind.annotation.RequestParam;
-
import org.springframework.web.bind.annotation.SessionAttributes;
-
-
import com.jxust.svsh.entity.Person;
-
import com.jxust.svsh.service.PersonService;
-
/**
-
* controller
-
*
@author
Peng
-
*
@Date
2016年12月9日上午11:25:40
-
*/
-
@SessionAttributes(value =
"username")
-
@Controller
-
@RequestMapping(value =
"/person")
-
public
class PersonController {
-
-
@Autowired
-
public PersonService personService;
-
-
/**
-
* 登录请求,失败返回error.jsp
-
*
-
*
@param
username
-
*
@param
password
-
*
@return
-
*/
-
@RequestMapping(
"/login")
-
public
String
dologin
(String username, String password, Map<String, Object> map) {
-
if (username.equals(
"admin") && password.equals(
"admin")) {
-
map.put(
"username", username);
//存放在request请求域中
-
/**
-
* 类上加上@SessionAttributes({"username"}) 同时也会存放在 session域中
-
*
@SessionAttributes
除了可以通过属性名指定需要存放到会话中的属性外(使用的是value属性值)
-
* 还可以通过模型属性的对象类型指定哪些模型属性需要放到会话中(实际上使用的是types属性值),
-
*/
-
return
"frame";
-
}
-
return
"error";
-
}
-
-
/**
-
* 保存添加的数据
-
*
-
*
@param
person
-
*
@return
-
*/
-
@RequestMapping(value =
"/saveperson")
-
public
String
saveperson
(Person person) {
-
personService.addPerson(person);
-
return
"redirect:main";
-
}
-
-
/**
-
* 跳转到添加页面
-
* savepage.jsp
-
*
@return
-
*/
-
@RequestMapping(value =
"/addperson")
-
public
String
saveperson
() {
-
-
return
"savepage";
-
}
-
-
/**
-
* 删除一条数据
-
*
-
*
@param
id
-
*
@return
-
*/
-
@RequestMapping(value =
"/deletePersonById")
-
public
String
deletePersonById
(@
RequestParam
(value =
"id"
) String id) {
-
System.out.println(
"删除单个");
-
personService.deletePersonById(id);
-
return
"redirect:main";
-
}
-
-
/**
-
* 跳转到更新页面,回显数据
-
* editpage.jsp
-
*
@param
id
-
*
@param
model 使用的Model保存回显数据
-
*
@return
-
*/
-
@RequestMapping(value =
"/doupdate")
-
public
String
doupdate
(@
RequestParam
(value =
"id"
) String id, Model model) {
-
model.addAttribute(
"person", personService.getPersonById(id));
-
return
"editpage";
-
}
-
-
/**
-
* 更新数据
-
*
-
*
@param
person
-
*
@return
-
*/
-
@RequestMapping(value =
"/updateperson")
-
public
String
updateperson
(Person person) {
-
System.out.println(person.toString());
-
personService.updatePerson(person);
-
return
"redirect:main";
-
}
-
-
/**
-
* 查询所有人员信息
-
*
-
*
@param
map 使用的是map保存回显数据
-
*
@return
-
*/
-
@RequestMapping(value =
"/main")
-
public
String
mian
(Map<String, Object> map) {
-
map.put(
"personlist", personService.getPersons());
-
/*遍历集合,查看查询到的数据
-
* List<Person> lists = personService.getPersons();
-
* Iterator<Person> it = lists.iterator();
-
* while(it.hasNext()){
-
* Person p =it.next();
-
* System.out.println(p.toString());
-
* }
-
*/
-
return
"main";
-
}
-
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
xml等配置文件
springmvc.xml
-
<?xml version="1.0" encoding="UTF-8"?>
-
<beans xmlns="http://www.springframework.org/schema/beans"
-
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
-
xmlns:aop
=
"http://www.springframework.org/schema/aop"
-
xmlns:context
=
"http://www.springframework.org/schema/context"
-
xmlns:mvc
=
"http://www.springframework.org/schema/mvc"
-
xsi:schemaLocation
=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
-
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
-
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
-
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd"
>
-
-
<!-- 配置自动扫描的包 -->
-
<context:component-scan base-package="com.jxust">
-
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
-
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
-
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
-
</context:component-scan>
-
-
-
<!-- 配置视图解析器 如何把 handler 方法返回值解析为实际的物理视图 -->
-
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
-
<property name="prefix" value="/WEB-INF/views/">
</property>
-
<property name="suffix" value=".jsp">
</property>
-
</bean>
-
-
<!-- 静态资源交给默认的Servlet-->
-
<mvc:default-servlet-handler/>
-
<mvc:annotation-driven>
</mvc:annotation-driven>
-
</beans>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
jdbc.properties
-
jdbc
.driverClass=
com
.mysql
.jdbc
.Driver
-
jdbc
.url=
jdbc:
mysql:/
/
127.0
.0
.1
:
3306
/ssh_person?characterEncoding=utf8&useSSL=
true
-
jdbc
.username=root
-
jdbc
.password=root
- 1
- 2
- 3
- 4
beans.xml
-
<?xml version="1.0" encoding="UTF-8"?>
-
<beans xmlns="http://www.springframework.org/schema/beans"
-
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
-
xmlns:aop
=
"http://www.springframework.org/schema/aop"
-
xmlns:context
=
"http://www.springframework.org/schema/context"
-
xmlns:tx
=
"http://www.springframework.org/schema/tx"
-
xsi:schemaLocation
=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
-
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
-
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd "
>
-
-
<context:component-scan base-package="com.jxust">
-
<context:exclude-filter type="annotation"
-
expression
=
"org.springframework.stereotype.Controller"
/>
-
</context:component-scan>
-
-
<!-- 引入外部的属性文件 -->
-
<context:property-placeholder location="classpath:/resources/jdbc.properties"/>
-
-
<!-- 配置c3p0 连接池 -->
-
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
-
<property name="driverClass" value="${jdbc.driverClass}"</span></span></span><span class="hljs-tag">/></span></span> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">property</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"jdbcUrl"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${jdbc.url}"/>
-
<property name="user" value="${jdbc.username}"</span></span></span><span class="hljs-tag">/></span></span> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">property</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"password"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${jdbc.password}"/>
-
</bean>
-
<!-- 配置hibernate 相关属性-->
-
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
-
<!-- 注入连接池-->
-
<property name="dataSource" ref="dataSource">
</property>
-
<!-- hibernate 的相关属性 -->
-
<property name="hibernateProperties" >
-
<props>
-
<prop key="hibernate.show_sql">true
</prop>
-
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect
</prop>
-
<prop key="hibernate.format_sql">true
</prop>
-
<!--
-
它包含4个属性:
-
* create : 会根据你的model类来生成表,但是每次运行都会删除上一次的表,重新生成表,哪怕2次没有任何改变
-
* create-drop : 根据model类生成表,但是sessionFactory一关闭,表就自动删除
-
* update : 最常用的属性,也根据model类生成表,即使表结构改变了,表中的行仍然存在,不会删除以前的行
-
* validate : 只会和数据库中的表进行比较,不会创建新表,但是会插入新值
-
-->
-
<prop key="hibernate.hbm2ddl.auto">update
</prop>
-
</props>
-
</property>
-
<!-- hibernate 映射文件 设置为自动扫描包目录-->
-
<property name="packagesToScan">
-
<list>
-
<value>com.jxust.svsh.entity
</value>
-
</list>
-
</property>
-
</bean>
-
-
<!-- 配置事务管理器 -->
-
<bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
-
<property name="sessionFactory" ref="sessionFactory">
</property>
-
</bean>
-
-
<!-- 开启事务注解 -->
-
<tx:annotation-driven transaction-manager="transactionManager" />
-
</beans>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
笔记.txt
-
C:\Users\Peng>mysql -uroot -proot
-
..
-
..
-
mysql> use ssh
_person;//要先创建数据库
-
Database changed
-
mysql> desc person;
-
+---------+--------------+------+-----+---------+-------+
-
| Field | Type | Null | Key | Default | Extra |
-
+---------+--------------+------+-----+---------+-------+
-
| id
| varchar(255) | NO
| PRI | NULL
| |
-
| address | varchar(255) | YES | | NULL | |
-
| idCard
| varchar(32) | NO
| | NULL
| |
-
| name | varchar(32) | NO | | NULL | |
-
| phone
| varchar(32) | NO
| | NULL
| |
-
+---------+--------------+------+-----+---------+-------+
-
5 rows in set (0.00 sec)
-
-
mysql> select * from person;
-
+----------------------------------+----------+-----------+------+---------+
-
| id | address | idCard | name | phone |
-
+----------------------------------+----------+-----------+------+---------+
-
| 402881e958de29980158de2aa5440000 | 江西南昌
| 20020020 | 天天
| 1008611 |
-
| 402881e958deb56b0158deb6a6200000 | 江西上饶
| 20020025 | 霍霍
| 1008614 |
-
| 402881e958dece620158decf2e3b0000 | 湖南长沙 | 230000032 | 胖子 | 1008677 |
-
+----------------------------------+----------+-----------+------+---------+
-
3 rows
in set (
0.
00 sec)
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
jsp页面
index.jsp
-
<%@ 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>登陆
</title>
-
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/style/reset.css"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">link</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"text/css"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">rel</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"stylesheet"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${pageContext.request.contextPath}/style/main.css">
-
<!--[if IE 6]>
-
<script type="text/javascript" src="js/DD_belatedPNG_0.0.8a-min.js"></script>
-
<script type="text/javascript" src="js/ie6Fixpng.js"></script>
-
<![endif]-->
-
</head>
-
-
<body>
-
<div class="headerBar">
-
<div class="logoBar login_logo">
-
<div class="comWidth">
-
<div class="logo fl">
-
<a href="#">
<img src="${pageContext.request.contextPath}/images/logo.jpg"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">alt</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"慕课网"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">h3</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"welcome_title"</span></span></span><span class="hljs-tag">></span></span>欢迎登陆<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">h3</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="27"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="29"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">form</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">action</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"person/login"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">method</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"post"</span></span></span><span class="hljs-tag"> ></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="30"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"loginBox"</span></span></span><span class="hljs-tag">></span></span> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="31"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="32"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"login_cont"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="33"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">ul</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"login"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="34"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"l_tit"</span></span></span><span class="hljs-tag">></span></span>用户名<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="35"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"mb_10"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"text"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"username"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"login_input user_icon"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="36"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"l_tit"</span></span></span><span class="hljs-tag">></span></span>密码<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="37"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"mb_10"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"password"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"password"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"login_input user_icon"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="38"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="39"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"submit"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">""</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"login_btn"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="40"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">ul</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="41"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"login_partners"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="42"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">p</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"l_tit"</span></span></span><span class="hljs-tag">></span></span>使用合作方账号登陆网站<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">p</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="43"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">ul</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"login_list clearfix"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="44"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>QQ<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="45"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="46"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>网易<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="47"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="48"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>新浪微博<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="49"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="50"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>腾讯微薄<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="51"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="52"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>新浪微博<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="53"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">span</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="54"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>腾讯微薄<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">li</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="55"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">ul</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="56"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="57"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="58"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="59"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="60"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">form</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="61"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="62"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"hr_25"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="63"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">div</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"footer"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="64"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">p</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>慕课简介<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>慕课公告<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>招纳贤士<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span>联系我们<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span>|<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">i</span></span></span><span class="hljs-tag">></span></span>客服热线:400-675-1234<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">p</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="65"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">p</span></span></span><span class="hljs-tag">></span></span>Copyright &copy; 2006 - 2014 慕课版权所有&nbsp;&nbsp;&nbsp;京ICP备09037834号&nbsp;&nbsp;&nbsp;京ICP证B1034-8373号&nbsp;&nbsp;&nbsp;某市公安局XX分局备案编号:123456789123<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">p</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="66"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">p</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"web"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">img</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">src</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${pageContext.request.contextPath}/images/webLogo.jpg" alt="logo">
</a>
<a href="#">
<img src="${pageContext.request.contextPath}/images/webLogo.jpg"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">alt</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"logo"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">href</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"#"</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">img</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">src</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${pageContext.request.contextPath}/images/webLogo.jpg" alt="logo">
</a>
<a href="#">
<img src="${pageContext.request.contextPath}/images/webLogo.jpg" alt="logo">
</a>
</p>
-
</div>
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
frame.jsp包含top.jsp 、right.jsp和left.jsp 3个页面
frame.jsp
-
<%@ 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>员工管理系统
</title>
-
</head>
-
-
<frameset rows="80,*">
-
<frame name="top"
-
src
=
"${pageContext.request.contextPath}/frame/top.jsp"</span></span></span><span class="hljs-tag">></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">frameset</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">cols</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"150,*"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">id</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"main"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">frame</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">src</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${pageContext.request.contextPath}/frame/left.jsp"
>
-
<frame name="right"
-
src
=
"${pageContext.request.contextPath}/frame/right.jsp"
>
-
</frameset>
-
</frameset>
-
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
top.jsp
-
<%@ page language="java" contentType="text/html; charset=UTF-8"
-
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" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
<style type="text/css">
-
.div1
{ margin-top:50px; margin-left:600px; font-size:14px; color:white
}
-
</style>
-
</head>
-
<body bgcolor="#0099FF">
-
<div class="div1">
-
欢迎您: ${sessionScope.username}
-
</div>
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
right.jsp
-
<%@ page language="java" contentType="text/html; charset=UTF-8"
-
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" "http://www.w3.org/TR/html4/loose.dtd">
-
<html>
-
<head>
-
</head>
-
<body bgColor=#DDF0FB>
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
left.jsp
-
<%@ 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>
-
<link href="dtree.css" rel="stylesheet" type="text/css">
-
<script type="text/javascript" src="dtree.js">
</script>
-
</head>
-
-
<body bgColor=#DDF0FB leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
-
<table width="90%" border="0" cellspacing="1" cellpadding="2" align="center">
-
<div class="dtree">
-
<script type="text/javascript">
-
d=
new
dTree(
'd'
);
-
-
d.add(
'01'
,
'-1'
,
'信息管理系统'
);
-
d.add(
'0101'
,
'01'
,
'人员管理'
);
-
d.add(
'010101'
,
'0101'
,
'人员列表'
,
'${pageContext.request.contextPath}/person/main'</span></span></span><span class="javascript">,</span><span class="hljs-string" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="javascript"><span class="hljs-string">''</span></span></span><span class="javascript">,</span><span class="hljs-string" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="javascript"><span class="hljs-string">'right'</span></span></span><span class="javascript">);</span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> d.add(<span class="hljs-string" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="javascript"><span class="hljs-string">'010102'</span></span></span><span class="javascript">,</span><span class="hljs-string" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="javascript"><span class="hljs-string">'0101'</span></span></span><span class="javascript">,</span><span class="hljs-string" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="javascript"><span class="hljs-string">'新增人员'</span></span></span><span class="javascript">,</span><span class="hljs-string" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="javascript"><span class="hljs-string">'${pageContext.request.contextPath}/person/addperson'
,
''
,
'right'
);
-
document.write(d);
-
</script>
-
</div>
-
</table>
-
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
main.jsp
-
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"%>
-
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-
<%
-
String
path =
request
.getContextPath();
-
String
basePath =
request
.getScheme()+
"://"
+
request
.getServerName()+
":"
+
request
.getServerPort()+path+
"/"
;
-
%>
-
<html>
-
<head>
-
<style type="text/css">
-
.table1
{
-
border:1px solid #ddd
;
-
width:900px
;
-
-
}
-
thead
{
-
background-color:lightblue
;
-
}
-
-
</style>
-
</head>
-
<body>
-
<table border="0" width="900px">
-
<tr>
-
<td align="center" style="font-size:24px; color:#666"> 人员管理
</td>
-
</tr>
-
<tr>
-
<td align="right" >
<a href="${pageContext.request.contextPath}/person/addperson"</span></span></span><span class="hljs-tag">></span></span>添加<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">a</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="29"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">table</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="30"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">br</span></span></span><span class="hljs-tag">/></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="31"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">table</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">cellspacing</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"0"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">border</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"1"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">class</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"table1"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="32"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">thead</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="33"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="34"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">width</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"300"</span></span></span><span class="hljs-tag">></span></span>姓名<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="35"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">width</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"300"</span></span></span><span class="hljs-tag">></span></span>身份证号<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="36"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">width</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"300"</span></span></span><span class="hljs-tag">></span></span>电话<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="37"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">width</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"300"</span></span></span><span class="hljs-tag">></span></span>地址<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="38"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">width</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"300"</span></span></span><span class="hljs-tag">></span></span>编辑<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="39"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">width</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"300"</span></span></span><span class="hljs-tag">></span></span>删除<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">th</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="40"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="41"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">thead</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="42"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tbody</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="43"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> </div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="44"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">c:forEach</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">var</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"p"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">items</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${requestScope.personlist }">
-
<tr>
-
<td align="center">${p.name }<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="47"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">align</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"center"</span></span></span><span class="hljs-tag">></span></span>${p.idCard }
</td>
-
<td align="center">${p.phone }<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="49"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">align</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"center"</span></span></span><span class="hljs-tag">></span></span>${p.address }
</td>
-
<td align="center">
-
<a href="${pageContext.request.contextPath}/person/doupdate?id=${p.id}">
<img src="<%=basePath %>images/编辑.png">
</a>
-
</td>
-
<td align="center">
-
<a href="${pageContext.request.contextPath}/person/deletePersonById?id=${p.id}" onclick='return confirm("确认要删除吗?")'>
<img src="<%=basePath %>images/trash.gif">
</a>
-
</td>
-
</tr>
-
</c:forEach>
-
</tbody>
-
</table>
-
<br/>
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
editpage.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 +
"/"
;
-
%>
-
<html>
-
<head>
</head>
-
<body>
-
-
<h3>员工编辑
</h3>
-
-
<br />
-
<br />
-
<!-- action对应一个action标签,id对应提交时的对应关系 -->
-
<form id="saveForm" action="${pageContext.request.contextPath}/person/updateperson"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">method</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"post"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"hidden"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"id"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${person.id }" />
-
<table style="font-size: :16px">
-
<tr>
-
<td>姓名:
</td>
-
<td>
<input type="text" value="${person.name }"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"name"</span></span></span><span class="hljs-tag"> /></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="24"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span>身份证号码:<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"text"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${person.idCard }" name="idCard" />
</td>
-
</tr>
-
<tr>
-
<tr>
-
<td>手机号:
</td>
-
<td>
<input type="text" value="${person.phone }"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"phone"</span></span></span><span class="hljs-tag"> /></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="32"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="33"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="34"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span>地址:<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="35"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"text"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${person.address }" name="address" />
</td>
-
</tr>
-
<tr>
-
-
<td align="right">
-
<input type="submit" value="更新" />
<a href="javascript:history.go(-1)">退回
</a>
-
</tr>
-
</table>
-
</form>
-
<!-- <tr>
-
-
<td align="right"><a
-
href="javascript:document.getElementById('saveForm').submit()">保存</a>
-
<a href="javascript:history.go(-1)">退回 </a></td>
-
</tr>
-
-->
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
savepage.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 +
"/"
;
-
%>
-
<html>
-
<head>
</head>
-
<body>
-
-
<h3>人员添加
</h3>
-
-
<br />
-
<br />
-
<form id="saveForm" action="${pageContext.request.contextPath}/person/saveperson"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">method</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"post"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">table</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">style</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"font-size: :16px"</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span>姓名:<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"text"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${person.name }" name="name" />
</td>
-
</tr>
-
<tr>
-
<td>身份证号码:
</td>
-
<td>
<input type="text" value="${person.idCard }"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">name</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"idCard"</span></span></span><span class="hljs-tag"> /></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="25"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="26"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="27"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">tr</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="28"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span>手机号:<span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"></</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span></div></div></li><li><div class="hljs-ln-numbers"><div class="hljs-ln-line hljs-ln-n" data-line-number="29"></div></div><div class="hljs-ln-code"><div class="hljs-ln-line"> <span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">td</span></span></span><span class="hljs-tag">></span></span><span class="hljs-tag" style="margin:0px; padding:0px; color:rgb(0,102,102)"><span class="hljs-tag"><</span><span class="hljs-title" style="margin:0px; padding:0px; color:rgb(0,0,136)"><span class="hljs-tag"><span class="hljs-name">input</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">type</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"text"</span></span></span><span class="hljs-tag"> </span><span class="hljs-attribute" style="margin:0px; padding:0px; color:rgb(102,0,102)"><span class="hljs-tag"><span class="hljs-attr">value</span></span></span><span class="hljs-tag">=</span><span class="hljs-value" style="margin:0px; padding:0px; color:rgb(0,136,0)"><span class="hljs-tag"><span class="hljs-string">"${person.phone }" name="phone" />
</td>
-
</tr>
-
<tr>
-
<td>地址:
</td>
-
<td>
<input type="text" value="${person.address }" name="address" />
</td>
-
</tr>
-
<tr>
-
-
<td align="right">
-
<input type="submit" value="添加" />
<a href="javascript:history.go(-1)">退回
</a>
-
</tr>
-
</table>
-
</form>
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
error.jsp
-
<%@ 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>
-
<h3>登录失败
</h3>
-
<a href="${pageContext.request.contextPath}/index.jsp">重新登录
</a>
-
</body>
-
</html>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
源码下载
</div>