如何开发简单的javaweb项目,jsp+javabean+servlet

时间:2022-12-29 07:59:26

一、相关的软件下载和环境配置

1、下载并配置JDK。

2、下载eclipse。

3、下载并配置apache-tomcat(服务器)。

4、下载MySQL(数据库)。

5、下载Navicat for MySQL(数据库可视化工具),方便对数据库的操作。

6、下载jdbc用来实现eclipse中的项目与数据库实现连接。

---以上可在网上查询教程

二、新建web项目

1.如何开发简单的javaweb项目,jsp+javabean+servlet

如何开发简单的javaweb项目,jsp+javabean+servlet

如何开发简单的javaweb项目,jsp+javabean+servlet

然后点击next,如何开发简单的javaweb项目,jsp+javabean+servlet

继续点next

如何开发简单的javaweb项目,jsp+javabean+servlet

勾选Generate web.xml如何开发简单的javaweb项目,jsp+javabean+servlet

然后finish

2.新建两个包

如何开发简单的javaweb项目,jsp+javabean+servlet

然后User就是我们封装的数据

package com.better.bean;

public class User {
private int userid;
private String username;
private String password;
public User() { }
public int getUserid() {
return userid;
}
public void setUserid(int userid) {
this.userid = userid;
}
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;
} }

建立类文件时一样

而servlet建立时不一样,如下

如何开发简单的javaweb项目,jsp+javabean+servlet

然后servlet代码如下

addservlet.java

package com.better.servlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException; import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; /**
* Servlet implementation class addservlet
*/
@WebServlet("/addservlet")
public class addservlet extends HttpServlet {
private static final long serialVersionUID = 1L; /**
* @see HttpServlet#HttpServlet()
*/
public addservlet() {
super();
// TODO Auto-generated constructor stub
} /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String username = request.getParameter("username");
String psword = request.getParameter("password");
String url = "jdbc:mysql://localhost:3306/demodb?&useSSL=false&serverTimezone=UTC";
String user = "root";
String password = "9527";
Connection conn = null;
PreparedStatement ps = null;
try {
Class.forName("com.mysql.cj.jdbc.Driver");
conn = DriverManager.getConnection(url, user, password);
} catch (ClassNotFoundException e) {
response.getWriter().print("加载驱动失败");
} catch (SQLException e) {
response.getWriter().print("连接数据库失败");
}
try {
String sql = "INSERT INTO user(username,password) VALUES (?,?)";
ps = conn.prepareStatement(sql);
ps.setString(1, username);
ps.setString(2, psword);
int row = ps.executeUpdate();
// 判断是否更新成功
if (row > 0)
// 更新成输出信息
response.getWriter().print("成功添加了 " + row + "条数据!");
} catch (SQLException e) {
response.getWriter().print("注册用户信息失败");
}
try {
if (ps != null) {
ps.close();
ps = null;
}
if (conn != null) {
conn.close();
conn = null;
} } catch (Exception e) {
response.getWriter().print("数据库关闭异常");
}
response.sendRedirect("main.jsp");
} /**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
} }

然后你要配置web.xml文件

如何开发简单的javaweb项目,jsp+javabean+servlet

点开它

<servlet>
<description></description>
<display-name>addservlet</display-name>
<servlet-name>addservlet</servlet-name>
<servlet-class>com.better.servlet.addservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>addservlet</servlet-name>
<url-pattern>/com.better.servlet/addservlet</url-pattern>
</servlet-mapping>

把这段代码插进去

然后就可以使用这个servlet了

接着是deleteservlet.java、searchservlet.java、updateservlet.java、checkservlet.java

package com.better.servlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException; import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; /**
* Servlet implementation class updateservlet
*/
@WebServlet("/updateservlet")
public class updateservlet extends HttpServlet {
private static final long serialVersionUID = 1L; /**
* @see HttpServlet#HttpServlet()
*/
public updateservlet() {
super();
// TODO Auto-generated constructor stub
} /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String username = request.getParameter("username");
String psword = request.getParameter("password");
String url = "jdbc:mysql://localhost:3306/demodb?&useSSL=false&serverTimezone=UTC";
String user = "root";
String password = "9527";
Connection conn = null;
PreparedStatement ps = null;
try {
Class.forName("com.mysql.cj.jdbc.Driver");
conn = DriverManager.getConnection(url, user, password);
} catch (ClassNotFoundException e) {
response.getWriter().print("加载驱动失败");
} catch (SQLException e) {
response.getWriter().print("连接数据库失败");
}
try {
String sql = "UPDATE user SET password=? WHERE username = ? ";
ps=conn.prepareStatement(sql);
ps.setString(1, psword);
ps.setString(2, username);
int row = ps.executeUpdate();
// 判断是否更新成功
if (row > 0)
// 更新成输出信息
response.getWriter().print("成功修改了 " + row + "条数据!");
} catch (SQLException e) {
response.getWriter().print("修改密码失败");
}
try {
if (ps != null) {
ps.close();
ps = null;
}
if (conn != null) {
conn.close();
conn = null;
} } catch (Exception e) {
response.getWriter().print("数据库关闭异常");
}
response.sendRedirect("main.jsp");
} /**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
} }
package com.better.servlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException; import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; /**
* Servlet implementation class checkservlet
*/
@WebServlet("/checkservlet")
public class checkservlet extends HttpServlet {
private static final long serialVersionUID = 1L; /**
* @see HttpServlet#HttpServlet()
*/
public checkservlet() {
super();
// TODO Auto-generated constructor stub
} /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String adminname = request.getParameter("adminname");
String adminword = request.getParameter("adminword");
String url = "jdbc:mysql://localhost:3306/demodb?&useSSL=false&serverTimezone=UTC";
String user = "root";
String password = "9527";
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs=null;
try {
Class.forName("com.mysql.cj.jdbc.Driver");
conn = DriverManager.getConnection(url, user, password);
} catch (ClassNotFoundException e) {
response.getWriter().print("加载驱动失败");
} catch (SQLException e) {
response.getWriter().print("连接数据库失败");
}
try{
String sql="SELECT * FROM admin WHERE adminname = ? and adminword=? ";
ps=conn.prepareStatement(sql);
ps.setString(1, adminname);
ps.setString(2, adminword);
rs=ps.executeQuery(); //将sql语句传至数据库,返回的值为一个字符集用一个变量接收
if(rs.next()){ //next()获取里面的内容
request.getRequestDispatcher("main.jsp")
.forward(request, response);
}
else request.getRequestDispatcher("login.jsp")
.forward(request, response);
}catch(SQLException e){
response.getWriter().print("数据库操作异常");
}
try{
if(rs!=null){
rs.close();
rs=null;
}
if(ps!=null){
ps.close();
ps=null;
}
if(conn!=null){
conn.close();
conn=null;
} }catch(Exception e){
response.getWriter().println("数据库关闭异常"); }
response.getWriter().append("Served at: ").append(request.getContextPath());
} /**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
} }
package com.better.servlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException; import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; /**
* Servlet implementation class deleteservlet
*/
@WebServlet("/deleteservlet")
public class deleteservlet extends HttpServlet {
private static final long serialVersionUID = 1L; /**
* @see HttpServlet#HttpServlet()
*/
public deleteservlet() {
super();
// TODO Auto-generated constructor stub
} /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String username = request.getParameter("username");
String url = "jdbc:mysql://localhost:3306/demodb?&useSSL=false&serverTimezone=UTC";
String user = "root";
String password = "9527";
Connection conn = null;
PreparedStatement ps = null;
try {
Class.forName("com.mysql.cj.jdbc.Driver");
conn = DriverManager.getConnection(url, user, password);
} catch (ClassNotFoundException e) {
response.getWriter().print("加载驱动失败");
} catch (SQLException e) {
response.getWriter().print("连接数据库失败");
}
try {
String sql = "DELETE FROM user WHERE username=?";
ps=conn.prepareStatement(sql);
ps.setString(1, username);
int row = ps.executeUpdate();
// 判断是否更新成功
if (row > 0)
// 更新成输出信息
response.getWriter().print("成功删除了 " + row + "条数据!");
} catch (SQLException e) {
response.getWriter().print("删除用户失败");
}
try {
if (ps != null) {
ps.close();
ps = null;
}
if (conn != null) {
conn.close();
conn = null;
} } catch (Exception e) {
response.getWriter().print("数据库关闭异常");
}
//重定向到main页面
response.sendRedirect("main.jsp");
} /**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
} }
package com.better.servlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException; import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; /**
* Servlet implementation class searchservlet
*/
@WebServlet("/searchservlet")
public class searchservlet extends HttpServlet {
private static final long serialVersionUID = 1L; /**
* @see HttpServlet#HttpServlet()
*/
public searchservlet() {
super();
// TODO Auto-generated constructor stub
} /**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String username = request.getParameter("username");
String url = "jdbc:mysql://localhost:3306/demodb?&useSSL=false&serverTimezone=UTC";
String user = "root";
String password = "9527";
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs=null;
try {
Class.forName("com.mysql.cj.jdbc.Driver");
conn = DriverManager.getConnection(url, user, password);
} catch (ClassNotFoundException e) {
response.getWriter().print("加载驱动失败");
} catch (SQLException e) {
response.getWriter().print("连接数据库失败");
}
try{
String sql="SELECT * FROM user WHERE username = ? ";
ps=conn.prepareStatement(sql);
ps.setString(1, username);
rs=ps.executeQuery(); //将sql语句传至数据库,返回的值为一个字符集用一个变量接收
while(rs.next()){ //next()获取里面的内容
response.getWriter().println(rs.getString(1)+" "+rs.getString(2)+" "+rs.getString(3));
//getString(n)获取第n列的内容
//数据库中的列数是从1开始的
}
}catch(SQLException e){ response.getWriter().print("查询用户失败");
}
try{
if(rs!=null){
rs.close();
rs=null;
}
if(ps!=null){
ps.close();
ps=null;
}
if(conn!=null){
conn.close();
conn=null;
} }catch(Exception e){
response.getWriter().println("数据库关闭异常"); } } /**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
} }

然后是完整的web.xml文件配置

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
<display-name>Better</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>addservlet</display-name>
<servlet-name>addservlet</servlet-name>
<servlet-class>com.better.servlet.addservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>addservlet</servlet-name>
<url-pattern>/com.better.servlet/addservlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>updateservlet</display-name>
<servlet-name>updateservlet</servlet-name>
<servlet-class>com.better.servlet.updateservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>updateservlet</servlet-name>
<url-pattern>/com.better.servlet/updateservlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>deleteservlet</display-name>
<servlet-name>deleteservlet</servlet-name>
<servlet-class>com.better.servlet.deleteservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>deleteservlet</servlet-name>
<url-pattern>/com.better.servlet/deleteservlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>searchservlet</display-name>
<servlet-name>searchservlet</servlet-name>
<servlet-class>com.better.servlet.searchservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>searchservlet</servlet-name>
<url-pattern>/com.better.servlet/searchservlet</url-pattern>
</servlet-mapping>
<servlet>
<description></description>
<display-name>checkservlet</display-name>
<servlet-name>checkservlet</servlet-name>
<servlet-class>com.better.servlet.checkservlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>checkservlet</servlet-name>
<url-pattern>/com.better.servlet/checkservlet</url-pattern>
</servlet-mapping>
</web-app>

login.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录页面</title>
</head>
<body
background="file:///D:/eclipse-workplace/Better/WebContent/image/星空.jpg">
<form action="checkservlet" method=post>
<center>
<table>
<tr>
<td><font color="white">输入管理员名:</font></td>
<td><INPUT type=txt name=adminname></td>
</tr>
<tr>
<td><font color="white">输入管理员密码:</font></td>
<td><INPUT type=password name=adminword></td>
</tr>
<tr colspan=2>
<td><INPUT type=submit value=登录></td>
</tr>
</table>
</center>
</form>
</body>
</html>

main.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>主界面</title>
</head>
<body>
<center><h1>主菜单</h1><center>
<table><center>
<h2 align="center">
<a href="Add.jsp">添加用户</a>
</h2>
<h2 align="center">
<a href="Delete.jsp">删除用户</a>
</h2>
<h2 align="center">
<a href="Update.jsp">修改用户</a>
</h2>
<h2 align="center">
<a href="Search.jsp">查询用户</a>
</h2>
</table></center>
</body>
</html>

Add.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加</title>
</head>
<script type="text/javascript">
function check(form) {
if(form.username.value=='') {
alert("请输入用户名!");
form.username.focus();
return false;
}
if(form.password.value==''){
alert("请输入登录密码!");
form.password.focus();
return false;
}
return true;
}
</script>
<body>
<form action="addservlet" method="post">
用户名: <input type=text name="username" size="18" value="" ><br>
登录密码:<input type="password" name="password" size="18" value=""/>
<input type=submit name="submit1" value="注册" onclick="return check(this.form)">
</form>
</body>
</html>

Delete.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>删除</title>
</head>
<script type="text/javascript">
function check(form) {
if(form.username.value=='') {
alert("请输入用户名!");
form.username.focus();
return false;
} }
</script>
<body>
<form action="deleteservlet" method="post">
想删除的用户名: <input type=text name="username" size="18" value="" ><br>
<input type=submit name="submit1" value="删除" onclick="return check(this.form)">
</form>
</body>
</html>

Update.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改</title>
</head>
<script type="text/javascript">
function check(form) {
if(form.username.value=='') {
alert("请输入用户名!");
form.username.focus();
return false;
}
if(form.password.value==''){
alert("请输入新密码!");
form.password.focus();
return false;
}
return true;
}
</script>
<body>
<form action="updateservlet" method="post">
用户名: <input type=text name="username" size="18" value="" ><br>
新密码:<input type="password" name="password" size="18" value=""/>
<input type=submit name="submit1" value="修改" onclick="return check(this.form)">
</form>
</body>
</html>

Search.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>查找</title>
</head>
<script type="text/javascript">
function check(form) {
if(form.username.value=='') {
alert("请输入用户名!");
form.username.focus();
return false;
} }
</script>
<body>
<form action="searchservlet" method="post">
想查找的用户名: <input type=text name="username" size="18" value="" ><br>
<input type=submit name="submit1" value="查找" onclick="return check(this.form)">
</form>
</body>
</html>

再就是建一个数据库两张表

如何开发简单的javaweb项目,jsp+javabean+servlet

User这张表

如何开发简单的javaweb项目,jsp+javabean+servlet

再就是管理员这张表

admin

如何开发简单的javaweb项目,jsp+javabean+servlet

如何开发简单的javaweb项目,jsp+javabean+servlet的更多相关文章

  1. 开发简单的JavaWeb项目

    一.配置相关环境 下载配置JDK,eclipse,Tomcat服务器,Mysql数据库,Navicat for MySQL(数据库可视化工具) 如果你已经做好各个环境的配置,eclipse与Tomca ...

  2. Struts与jsp&plus;javabean&plus;servlet区别

    采用Struts框架技术和直接使用jsp+javabean技术开发各有什么优势?各自的缺点又是什么? 在Javaweb开发领域存在2种开发模式, 模式一,jsp+javabean 模式二,jsp+ja ...

  3. JSP&plus;JavaBean&plus;Servlet技术(MVC模型)

    一,Servlet开发用户在浏览器中输入一个网址并回车,浏览器会向服务器发送一个HTTP请求.服务器端程序接受这个请求,并对请求进行处理,然后发送一个回应.浏览器收到回应,再把回应的内容显示出来.这种 ...

  4. JSP&plus;JavaBean&plus;Servlet工作原理实例…

    JSP+JavaBean+Servlet工作原理实例讲解 首先,JavaBean和Servlet虽都是Java程序,但是是完全不同的两个概念.引用mz3226960提出的MVC的概念,即M-model ...

  5. MyEclipse配置Tomcat开发JavaWeb程序JSP以及Servlet

    1.安装准备 1).下载安装MyEclipse2014,这已经是最新版本. 2).下载Tomcat 官网:http://tomcat.apache.org/ 我们选择8.0: http://tomca ...

  6. JavaEE学习总结(十三)—JavaWeb、JSP、Servlet与DVD管理系统

    一.JSP基础知识 1.0.创建数据库与表 /* Navicat MySQL Data Transfer Source Server : 127.0.0.1 Source Server Version ...

  7. 如何在java代码中调用一个web项目jsp或者servlet

    有时候需要调用一个web项目的jsp或者servlet,但是执行内部的代码,并不是打开jsp,例如需要在一段java代码中清除一个web项目中的缓存,那么可以把清除缓存的代码放在该web项目的一个se ...

  8. MyEclipse2014配置Tomcat开发JavaWeb程序JSP以及Servlet(转载)

    转载地址:http://blog.csdn.net/21aspnet/article/details/21867241 1.安装准备 1).下载安装MyEclipse2014,这已经是最新版本. 2) ...

  9. (转)MyEclipse2014配置Tomcat开发JavaWeb程序JSP以及Servlet

    1.安装准备 1).下载安装MyEclipse2014,这已经是最新版本. 2).下载Tomcat 官网:http://tomcat.apache.org/ 我们选择8.0: http://tomca ...

随机推荐

  1. selenium&period;Phantomjs设置浏览器请求头

    from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCap ...

  2. MYSQL存储过程:批量更新数据

    地区等级的信息储存在jsjh_district表. 要更新jsjh_goods_district表的district_level地区信息 DELIMITER $$ DROP PROCEDURE IF ...

  3. VIM进阶学习之几种模式和按键映射

    Map是Vim强大的一个重要原因,可以自定义各种快捷键,用起来自然得心应手. vim里最基本的map用法也就是 :map c a 这里把c映射成了a,在map生效的情况下,按下c就等同于按下了a 当然 ...

  4. DICOM医学图像处理:开源库mDCM与DCMTK的比較分析(一),JPEG无损压缩DCM图像

    背景介绍: 近期项目需求,须要使用C#进行最新的UI和相关DICOM3.0医学图像模块的开发.在C++语言下,我使用的是应用最广泛的DCMTK开源库,在本专栏的起初阶段的大多数博文都是对DCMTK开源 ...

  5. 原创:运行loadtest时报错the load test results repository was created with a previous version and is not compatible

    如果run setting中的Storage Type设置为DataBase,则需要设置数据库来保存loadtest的运行结果,如下图所示 图:Storage Type设置为DataBase 图:在M ...

  6. Apache配置对外访问默认路径(域名默认访问路径)

    摘抄.同以下博主遇到同样问题,故此记录. 作者:ChasingdreamLY 原文:https://blog.csdn.net/qq_26591517/article/details/80414073 ...

  7. oracle insert、append、parallel、随后查询的redo与磁盘读写

    SQL> set autotrace traceonly statistics; SQL> insert into big_table_dir_test1 select * from bi ...

  8. 你要的fpga&amp&semi;数字前端笔面试题都在这儿了

    转自http://ninghechuan.com 你要的FPGA&数字前端笔面试题来了 FPGA&ASIC基本开发流程 题目:简述ASIC设计流程,并列举出各部分用到的工具. 勘误:C ...

  9. 文本框JTextField,密码框JPasswordField

    1.文本框JTextField public class Demo extends JFrame { public Demo() { setBounds(100, 100, 200, 120); se ...

  10. Redis(一)源码安装

    redis 是一款开源的,基于 BSD 许可的,高级键值 (key-value) 缓存 (cache) 和存储 (store) 系统.性能极高,并且支持丰富的数据结构.下面将介绍在ubuntu 14. ...