前天下了第一场雪,专业课老师给我们布置了一个期末小作业,真的感觉到寒假就要来临了。这个学期没过多久就要结束了。总结这学期,感觉还是有不少收获的。完成了当初许下的诺言,现在也越来越喜欢软件这个行业了,虽然在编程的时候运行一出错就感觉到异常的烦心。但是问题解决之后又是异常的开心。大概这就是编程的乐趣与纠结所在吧。好了,不说那么多废话了,现在开始上截图:

下面粘贴代码:

首先是目录结构:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>add.jsp</title>
<script type="text/javascript" src="<c:url value='/jquery/contactor.js'/>"></script> <style type="text/css">
body{
text-align: center;
font-size:38px;
}
*{
font-family:华文楷体;
font-size:18px;
color:#F0F";
}
h1{
text-align: center;
font-size:38px;
}
</style> </head> <body > <h1 style="font-size:38px;">添加新的联系人</h1> <form action="<c:url value='/ContactorServlet?userId=${userId } '/>" method="post" onsubmit="return checkForm()">
<input type="hidden" name="method" value="4">
<table border="1" width="50%" align="center">
<tr>
<td>姓名</td>
<td>
<input type="text" name="name" id="name" onfocus="nameFocus()" onblur="nameBlur()"/>
<div id="nameId"></div>
</td>
</tr>
<tr>
<td>电话</td>
<td>
<input type="text" name="tel" id="tel" onfocus="telFocus()" onblur="telBlur()"/>
<div id="telId"></div>
</td>
</tr>
<tr>
<td>地址</td>
<td>
<input type="text" name="address" id="address" />
</td>
</tr>
<tr>
<td>邮编</td>
<td>
<input type="text" name="zipcode" />
</td>
</tr> </table>
<input style="margin-right:200px;" type="submit" value="添加"/> </form>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>edit.jsp</title> <script type="text/javascript" src="<c:url value='/jquery/contactor.js'/>"></script> <style type="text/css">
body{
text-align: center;
font-size:38px;
}
*{
font-family:华文楷体;
font-size:18px;
color:#F0F";
}
h1{
text-align: center;
font-size:38px;
}
</style> </head> <body >
<h1 style="font-size:38px;">修改联系人信息</h1>
<form action="<c:url value='/ContactorServlet'/>" method="post" onsubmit="return checkForm()">
<input type="hidden" name="method" value="6">
<input type="hidden" name="id" value="${contactor.id }">
<table border="1" width="50%" align="center">
<tr>
<td>姓名</td>
<td>
<input type="text" name="name" value="${contactor.name }" id="name" onfocus="nameFocus()" onblur="nameBlur()"/>
<div id="nameId"></div>
</td>
</tr>
<tr>
<td>电话</td>
<td>
<input type="text" name="tel" value="${contactor.tel }" id="tel" onfocus="telFocus()" onblur="telBlur()" />
<div id="telId"></div>
</td>
</tr>
<tr>
<td>地址</td>
<td>
<input type="text" id="address" name="address" value="${contactor.address }" />
</td>
</tr>
<tr>
<td>邮编</td>
<td>
<input type="text" name="zipcode" value="${contactor.zipcode }" />
</td>
</tr> </table>
<input style="margin-right:200px;" type="submit" value="更改"/> </form>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>home.jsp</title>
</head> <frameset rows="100%,*"> <frame name="body" src="<c:url value='/jsp/top.jsp'/>" />
</frameset>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>list.jsp</title>
<style type="text/css">
body{
text-align: center;
font-size:38px;
}
*{
font-family:华文楷体;
font-size:18px;
color:#F0F";
}
h1{
text-align: center;
font-size:38px;
}
a:link{
color: #999;
text-decoration: none;
}
a:VISITED {
text-decoration: none;
color: #c60;
}
a:HOVER {
text-decoration: none;
color: #00F;
}
</style> </head> <body >
<h1 style="font-size:38px;">欢迎登录到通信录系统</h1>
<a style="font-size:26px;" href="<c:url value='/ContactorServlet?method=3&userId=${userId }'/>">查看联系人</a>
<a style="font-size:26px;" href="<c:url value='/jsp/add.jsp'/>">添加联系人</a>
<a style="font-size:26px;" href="<c:url value='/jsp/top.jsp'/>">退出系统</a> <table border="1" align="center" width="60%">
<tr>
<th>姓名</th>
<th>电话</th>
<th>地址</th>
<th>邮编</th>
<th>操作1</th>
<th>操作2</th> </tr>
<c:forEach items="${contactorList }" var="c">
<tr>
<td>${c.name }</td>
<td>${c.tel }</td>
<td>${c.address }</td>
<td>${c.zipcode }</td> <td><a href="<c:url value='/ContactorServlet?method=5&id=${c.id }'/>">编辑</a>
</td>
<td>
<a href="<c:url value='/ContactorServlet?method=7&id=${c.id }'/>" >删除</a>
</td>
</tr>
</c:forEach>
</table>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>top.jsp</title>
<style type="text/css">
body{
text-align: center;
font-size:38px;
}
*{
font-family:华文楷体;
font-size:18px;
color:#F0F";
}
h1{
text-align: center;
font-size:38px;
}
</style> </head> <body >
<h1 style="font-size:38px;">我的通信录</h1> <form action="<c:url value='/ContactorServlet'/>" method="post">
<input type="hidden" name="method" value="1">
用户名:<input type="text" name="username" /><br/>
密 &nbsp; 码:<input type="password" name="password" /><br/>
<input type="submit" value="注册">
</form>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>top.jsp</title>
<style type="text/css">
body{
text-align: center;
font-size:38px;
}
*{
font-family:华文楷体;
font-size:18px;
color:#F0F";
}
h1{
text-align: center;
font-size:38px;
}
</style>
</head> <body >
<h1 style="font-size:38px;">我的通信录</h1> <form action="<c:url value='/ContactorServlet'/>" method="post">
<input type="hidden" name="method" value="2">
用户名:<input type="text" name="username"/><br/>
密 &nbsp; 码:<input type="password" name="password"/><br/>
<input type="submit" value="登录">
<a href="<c:url value='/jsp/register.jsp'/>" target="body" >注册</a>
</form>
</body>
</html>

index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:forward page="/jsp/home.jsp" />

contactor.js

//当鼠标放在客户名文本框时,给出一个提示文本
function nameFocus() {
var nameId = document.getElementById("nameId");
nameId.innerHTML = "请输入客户真实姓名";
}
//当鼠标离开客户名文本框时,给出一个文本提示
function nameBlur() {
var name = document.getElementById("name");
var nameId = document.getElementById("nameId");
var reg= /^[\u4e00-\u9fa5]+$/;
if(name.value == ""){
nameId.innerHTML = "<font color='red'>联系人名不能为空</font>";
return false;
}
if(reg.test(name.value) == false){
nameId.innerHTML = "<font color='red'>联系人名只能输入中文简体汉字</font>";
return false;
}
nameId.innerHTML = "<font color='green'>联系人名输入正确</font>";
return true; }
//当鼠标放在客户名文本框时,给出一个提示文本
function telFocus() {
var telId = document.getElementById("telId");
telId.innerHTML = "请输入手机号码";
} //当鼠标离开客户名文本框时,给出一个文本提示
function telBlur() {
var tel = document.getElementById("tel");
var telId = document.getElementById("telId");
var reg= /^(13|15|17|18)\d{9}$/;
if(tel.value == ""){
telId.innerHTML = "<font color='red'>手机号码不能为空</font>";
return false;
}
if(reg.test(tel.value) == false){
telId.innerHTML = "<font color='red'>手机号码输入不正确</font>";
return false;
}
telId.innerHTML = "<font color='green'>手机号码输入正确</font>";
return true; } //表单提交时验证输入内容的有效性
function checkForm() {
var flagname = nameBlur();
var flagtel = telBlur();
if(flagname == true && flagtel == true ){
return true;
}else{
alert("失败,请按提示输入信息 !")
return false;
} }
package cn.edu.aynu.rjxy.bean;
/**
* 联系人表属性
* @author Administrator
*
*/
public class Contactor {
private int id;
private int userId;
private String name;
private String tel;
private String address;
private String zipcode; public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
} }
package cn.edu.aynu.rjxy.bean;
/**
* 用户表属性
* @author Administrator
*
*/
public class User {
private int id;
private String username;
private String password;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
} }
package cn.edu.aynu.rjxy.dao;

import java.sql.SQLException;
import java.util.List; import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.BeanListHandler; import cn.edu.aynu.rjxy.bean.Contactor;
import cn.edu.aynu.rjxy.utils.JDBCUtils; /**
* 对linkman表的增删改查
* @author Administrator
*
*/
public class ContactorDao {
private QueryRunner qr = new QueryRunner(JDBCUtils.getDataSource());
/**
* 添加联系人
* @param c
* @throws SQLException
*/
public void insert(Contactor c,int userId) throws SQLException{
String sql = "insert into linkman(name,tel,address,zipcode,userId) values(?,?,?,?,?)";
qr.update(sql, c.getName(),c.getTel(),c.getAddress(),c.getZipcode(),userId);
}
/**
* 删除联系人
* @param cid
* @throws SQLException
*/
public void delete(int id) throws SQLException{
String sql = "delete from linkman where id=?";
qr.update(sql, id);
}
/**
* 修改联系人
* @param c
* @throws SQLException
*/
public void update(Contactor c,int userId) throws SQLException{
String sql = "update linkman set name=?,tel=?,address=?,zipcode=?,userId=? where id=?";
qr.update(sql, c.getName(),c.getTel(),c.getAddress(),c.getZipcode(),userId,c.getId());
}
/**
* 根据userId查询联系人
* @throws SQLException
*
*/
public List<Contactor> findAll(int userId) throws SQLException{
String sql = "select * from linkman where userId = ?";
List<Contactor> list = qr.query(sql, new BeanListHandler<Contactor>(Contactor.class),userId);
return list; }
/**
* 根据id查询某个联系人
* @throws SQLException
*
*/
public Contactor findByCid(int id) throws SQLException{
String sql = "select * from linkman where id=?";
Contactor c = qr.query(sql, new BeanHandler<Contactor>(Contactor.class), id);
return c;
} }
package cn.edu.aynu.rjxy.dao;

import java.sql.SQLException;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler; import cn.edu.aynu.rjxy.bean.User;
import cn.edu.aynu.rjxy.utils.JDBCUtils; /**
* 对user表的查询
* @author Administrator
*
*/
public class UserDao {
private QueryRunner qr = new QueryRunner(JDBCUtils.getDataSource());
/**
* 根据用户名和用户密码查询
* @param cid
* @return
* @throws SQLException
*/
public User findByCid(String username,String password) throws SQLException{
String sql = "select * from user where username=?&&password=?";
User u = qr.query(sql, new BeanHandler<User>(User.class), username,password);
return u;
}
/**
* 注册
* @param c
* @throws SQLException
*/
public void register(User u) throws SQLException{
String sql = "insert into user(username,password) values(?,?)";
qr.update(sql, u.getUsername(),u.getPassword());
}
}
package cn.edu.aynu.rjxy.service;

import java.sql.SQLException;
import java.util.List; import cn.edu.aynu.rjxy.bean.Contactor;
import cn.edu.aynu.rjxy.dao.ContactorDao; /**
* 联系人功能处理
* @author Administrator
*
*/
public class ContactorService {
//创建ContactorDao对象
ContactorDao dao = new ContactorDao();
/**
* 添加联系人
* @param c
*/
public void add(Contactor c,int userId){
try {
dao.insert(c,userId);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
/**
* 删除联系人
* @param cid
*/
public void delete(int id){
try {
dao.delete(id);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
/**
* 加载(查询)联系人
* @param cid
*/
public List<Contactor> load(int userId){
try {
return dao.findAll(userId);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
/**
* 加载(查询)联系人(为修改做准备)
* @param cid
*/
public Contactor loadById(int id){
try {
return dao.findByCid(id);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
/**
* 编辑(修改)联系人信息
* @param c
*/
public void edit(Contactor c,int userId){
try {
dao.update(c,userId);
} catch (SQLException e) {
throw new RuntimeException(e);
}
} }
package cn.edu.aynu.rjxy.service;

import java.sql.SQLException;

import cn.edu.aynu.rjxy.bean.User;
import cn.edu.aynu.rjxy.dao.UserDao; /**
*
* @author Administrator
*
*/
public class UserService {
//创建ContactorDao对象
UserDao dao = new UserDao();
/**
* 根据用户名和密码查询用户
* @param cid
*/
public User login(String username,String password){
try {
return dao.findByCid(username,password);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
/**
* 注册
* @param c
*/
public void register(User u){
try {
dao.register(u);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
package cn.edu.aynu.rjxy.servlet;

import java.io.IOException;
import java.util.List; import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import cn.edu.aynu.rjxy.bean.Contactor;
import cn.edu.aynu.rjxy.bean.User;
import cn.edu.aynu.rjxy.service.ContactorService;
import cn.edu.aynu.rjxy.service.UserService;
import cn.edu.aynu.rjxy.utils.CommonsUtils;
/**
* 处理联系人请求
* @author Administrator
*
*/
public class ContactorServlet extends HttpServlet {
private ContactorService cs = new ContactorService();
private UserService us = new UserService();
private int userId;
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { this.doPost(request, response);
} /**
* 通过获取表单中的隐藏字段method或者超链接中的method参数的值来区分调用执行那个方法来处理这个请求
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//处理中文乱码
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
//获取隐藏字段method的值,并把它转换为int型
int method = Integer.parseInt(request.getParameter("method")); switch(method){
case 1: this.register(request, response);
break;
case 2: this.login(request, response);
break;
case 3: this.query(request, response);
break;
case 4: this.add(request, response);
break;
case 5: this.loadForUpdate(request, response);
break;
case 6: this.edit(request, response);
break;
case 7: this.delete(request, response);
break;
} }
/**
* 处理注册的请求
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void register(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//使用CommonUtils工具类将请求数据封装到bean中
User u = CommonsUtils.toBean(request.getParameterMap(), User.class);
//执行添加客户业务
us.register(u);
//输出添加成功提示
response.getWriter().print("注册成功,三秒钟自动跳转到登录界面");
response.setHeader("Refresh","3;url=http://127.0.0.1:8099/addresslist/jsp/top.jsp"); }
/**
* 处理登录的请求 method=2
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void login(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//从请求中解析用户名和密码
String username = request.getParameter("username");
String password = request.getParameter("password");
//执行加载业务
User u = us.login(username, password);
if (u != null) {
HttpSession session = request.getSession();
session.setAttribute("userId", u.getId());
response.getWriter().print("登录成功"+u.getId());
//通过请求转发将pb带到list.jsp上去
request.getRequestDispatcher("/jsp/list.jsp").forward(request, response);
}else{
response.getWriter().print("登录失败,即将跳转到登录页面,请重新登录......");
response.setHeader("Refresh","3;url=http://127.0.0.1:8099/addresslist/jsp/top.jsp"); } }
/**
* 处理查看联系人的请求 method=3
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void query(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
HttpSession session = request.getSession();
userId = (Integer) session.getAttribute("userId");
//执行查询业务
List<Contactor> list = cs.load(userId);
//将list存放到request域中
request.setAttribute("contactorList", list);
System.out.println(list.size());
//通过请求转发将查询结果带到list.jsp页面上显示
request.getRequestDispatcher("/jsp/list.jsp").forward(request, response); }
/**
* 处理添加客户的请求
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void add(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
HttpSession session = request.getSession();
userId = (Integer) session.getAttribute("userId");
//使用CommonUtils工具类将请求数据封装到bean中
Contactor c = CommonsUtils.toBean(request.getParameterMap(), Contactor.class);
//执行添加客户业务
cs.add(c,userId);
//输出添加成功提示
response.getWriter().print("添加成功,三秒后跳转到功能界面......");
response.setHeader("Refresh","3;url=http://127.0.0.1:8099/addresslist/jsp/list.jsp");
}
/**
* 处理加载某一个客户的请求
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void loadForUpdate(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//从请求中获取客户的cid
String ids = request.getParameter("id");
int id = Integer.valueOf(ids);
//执行加载业务
Contactor c = cs.loadById(id);
//将Customer对象c保存在request域中
request.setAttribute("contactor", c);
//通过请求转发将customer对象显示在list.jsp页面上
request.getRequestDispatcher("/jsp/edit.jsp").forward(request, response); }
/**
* 处理更改某一联系人的请求
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void edit(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
HttpSession session = request.getSession();
userId = (Integer) session.getAttribute("userId");
//使用CommonUtils工具类将请求数据封装到bean中
Contactor c = CommonsUtils.toBean(request.getParameterMap(), Contactor.class);
//执行更改业务
cs.edit(c,userId);
//给客户端发送更改成功提示
response.getWriter().print("更改成功,三秒后跳转到功能界面......");
response.setHeader("Refresh","3;url=http://127.0.0.1:8099/addresslist/jsp/list.jsp"); }
/**
* 处理删除某一联系人的请求
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/
public void delete(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//从请求中获取cid
String cid = request.getParameter("id");
int id = Integer.valueOf(cid);
//执行删除客户业务
cs.delete(id);
//给客户端发送删除成功提示
response.getWriter().print("删除成功,三秒后跳转到功能界面......");
response.setHeader("Refresh","3;url=http://127.0.0.1:8099/addresslist/jsp/list.jsp"); } }
package cn.edu.aynu.rjxy.utils;

import java.util.Map;
import java.util.UUID; import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.ConvertUtils; /**
* 提供UUID,实现表单数据封装到bean中
* @author Administrator
*
*/
public class CommonsUtils {
/**
* 返回一个UUID
* @return
*/
public static String uuid(){
return UUID.randomUUID().toString().replace("-", "").toUpperCase(); } /**
* 把表单数据封装到bean中
*/
public static <T> T toBean(Map data, Class<T> clazz){
try{
T bean = clazz.newInstance();
BeanUtils.populate(bean, data);
return bean;
}catch (Exception e) {
throw new RuntimeException(e);
}
} }
package cn.edu.aynu.rjxy.utils;

import java.sql.Connection;
import java.sql.SQLException; import javax.sql.DataSource; import com.mchange.v2.c3p0.ComboPooledDataSource; /**
* 创建数据库连接池
* @author Administrator
*
*/
public class JDBCUtils {
//读取的是C3P0-config默认配置创建数据库连接池对象
private static DataSource ds = new ComboPooledDataSource();
//获取数据库连接池对象
public static DataSource getDataSource(){
return ds;
}
//从池中获取连接
public static Connection getConnection() throws SQLException{
return ds.getConnection();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<c3p0-config>
<!-- 默认配置,当使用ComboPooledDataSource无参构造器时,使用的就是这个配置 -->
<default-config>
<!-- 基本配置 -->
<property name="jdbcUrl">jdbc:mysql://localhost:3306/linkman?characterEncoding=UTF-8</property>
<property name="driverClass">com.mysql.jdbc.Driver</property>
<property name="user">root</property>
<property name="password">123456</property>
<!-- 每次增量,当需要创建Connection对象时,一次创建几个 -->
<property name="acquireIncrement">3</property>
<!-- 当创建池对象后,池中应该有几个Connection对象 -->
<property name="initialPoolSize">10</property>
<!-- 池中最少Connection个数,如果少于这个值,就会创建Connection -->
<property name="minPoolSize">2</property>
<!-- 池中最大连接个数 -->
<property name="maxPoolSize">10</property>
</default-config>
</c3p0-config>

该工程需要的jar包:

java web之个人通讯录系统的更多相关文章

  1. Java Web项目在Mac系统上启动时提示nodename nor servname provided

    今天一不小心更新了Mac系统,然后在启动Java Web项目的时候,提示了java.net.UnknownHostException: MAC-mini-local nodename nor serv ...

  2. Java Web项目在Mac系统上启动时提示nodename nor servname provided的解决办法

    今天在Mac系统上启动Java Web项目的时候,提示了Java.net.UnknownHostException: yangxiaomindeMacBook-Pro.local nodename n ...

  3. Java Web之网上购物系统(提交订单、查看我的订单)

    作业终于做完了,好开心......虽然这一周经历不是那么顺利,但是觉得还是收获了不少,有过想哭的冲动,代码不会写,事情办不好,各种发愁.空间里发小发了带父母出去游玩的照片,瞬间能量值不知道是被击退的多 ...

  4. Java Web之网上购物系统(注册、登录、浏览商品、添加购物车)

    眼看就要期末了,我的专业课也迎来了第二次的期末作业---------<网上购物系统>.虽然老师的意图是在锻炼我们后台的能力,但是想着还是不利用网上的模板,准备自己写,以来别人写的静态页看不 ...

  5. Java web期末项目第一阶段成果发表

    摘要 我们做的系统是一个基于Java web与MySQL的食堂订餐系统 班级: 计科二班 小组成员:李鉴宣.袁超 我们的第一阶段主要完成以下三件事: 完成项目的需求分析 完成项目的领域逻辑(domai ...

  6. 零基础如何系统学习Java Web

    零基础如何系统学习Java Web?   我来给你说一说 你要下决心,我要转行做开发,这样你才能学成. 你要会打字,我公司原来有一个程序员,打字都是两个手一指禅,身为程序员你一指禅怎么写出的代码,半个 ...

  7. 谈一次java web系统的重构思路

    ——略谈Java web软件如何提供二次开发接口 接手公司的一个Java web软件产品,该软件采用传统的dwr框架.dwr框架相当于一个中间层,使得javascript能够识别Java类对象,进而能 ...

  8. Docker学习笔记三:Docker部署Java web系统

    Docker部署Java Web系统 1.在root目录下创建一个路径test/app mkdir test && cd test&& mkdir app && ...

  9. [经验] Java Web 项目怎么部署到 Linux 系统上

    废话少说, 直奔主题 第一步: 将 web 项目打成 war 包 1: 打开项目的 pom.xml 文件 如果是迭代后的项目, 记得修改项目的版本号, 这里我的是第二版所有就把 1 改成了 2 2: ...

随机推荐

  1. 工大助手(C#与python交互)

    工大助手(爬虫--C#与python交互) 基本内容 工大助手(桌面版) 实现登陆.查成绩.计算加权平均分等功能 团队人员 13070046 孙宇辰 13070003 张帆 13070004 崔巍 1 ...

  2. HackerNews——《Pokemon Go玩家存在巨大的安全风险》

    译者注:原文来自HackerNews,首发tumblr,标题为Pokemon Go is a huge security risk.作者Adam Reeve,附一张这个胖子的帅照   (正文)之所以会 ...

  3. 转 10 个最佳的 Node.js 的 MVC 框架

    10 个最佳的 Node.js 的 MVC 框架 oschina 发布于: 2014年02月24日 (33评) 分享到:    收藏 +322 Node.js 是一个基于Chrome JavaScri ...

  4. ASP.NET MVC 描述类型(二)

    ASP.NET MVC 描述类型(二) 前言 上个篇幅中说到ControllerDescriptor类型的由来过程,对于ControllerDescriptor类型来言ActionDescriptor ...

  5. Visual Studio 实用扩展推荐

    Visual Studio 拥有非常不错的可扩展性,在之前的文章中,我也给大家示范了如何进行编辑器的扩展(详见文末参考资源).在本篇文章中,我将介绍几款非常实用的扩展,从而帮助我们提高开发效率. C# ...

  6. angular view之间的数据传递

    之前写过一篇backbone view之间的传递,由于现在在用angular搞开发,现在也来总结一下.在angular 传递数据通俗的讲叫做 广播 ,在一些文章中,也叫做事件的发布与订阅,在angul ...

  7. 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(14)-EasyUI缺陷修复与扩展

    系列目录 不知不觉已经过了13讲,(本来还要讲多一讲是,数据验证之自定义验证,基于园友还是对权限这块比较敢兴趣,讲不讲验证还是看大家的反映),我们应该对系统有一个小结.首先这是一个团队开发项目,基于接 ...

  8. 添加 Pool Member - 每天5分钟玩转 OpenStack(123)

    我们已经有了 Load Balance Pool "web servers"和 VIP,接下来需要往 Pool 里添加 member 并学习如何使用 cloud image. 先准 ...

  9. Java多线程系列--“JUC锁”03之 公平锁(一)

    概要 本章对“公平锁”的获取锁机制进行介绍(本文的公平锁指的是互斥锁的公平锁),内容包括:基本概念ReentrantLock数据结构参考代码获取公平锁(基于JDK1.7.0_40)一. tryAcqu ...

  10. 【Python五篇慢慢弹(3)】函数修行知python

    函数修行知python 作者:白宁超 2016年10月9日21:51:52 摘要:继<快速上手学python>一文之后,笔者又将python官方文档认真学习下.官方给出的pythondoc ...