- 浏览: 746669 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
lengzl:
请问,那个Node 是哪个包里面的类?
JAVA 二叉树的递归和非递归遍历 -
gongchuangsu:
总结的很好,感谢感谢
JAVA 二叉树的递归和非递归遍历 -
Caelebs:
666666666 居然是10年发的,难怪截屏自动保存的名字是 ...
截图工具 -
jijiqw:
是注解不是注释。。。
Spring @Transactional (一) -
letueo:
[b][b][b][b][b][b][b][b][b][b][ ...
Spring @Transactional (一)
//login.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'login.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form name="form1" action="UserServlet.do?method=login" method="post">
<table width="200" border="1">
<tr>
<td colspan="2">登录窗口</td>
<tr>
<td>用户名</td>
<td><input type="text" name="username" size="10"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password" size="10"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="登录"> <a
href="register.jsp">注册新用户</a></td>
</tr>
</table>
</form>
</body>
</html>
//register.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'register.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form name="form1" action="UserServlet.do?method=register" method="post">
<table width="200" border="1">
<tr>
<td colspan="2">注册窗口</td>
<tr>
<td>用户名</td>
<td><input type="text" name="username" size="10"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password1" size="10"></td>
</tr>
<tr>
<td>确认密码</td>
<td><input type="password" name="password2" size="10"></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" size="10"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="提交注册"> <a
href="login.jsp">返回</a></td>
</tr>
</table>
</form>
</body>
</html>
//logout.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'welcome.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<table width="100%">
<tr>
<td><img src="images/logo4.png"></td>
<td><img src="images/logo2.png" height="90"></td>
</tr>
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><a href="welcome.jsp">Main</a></td>
</tr>
<tr>
<td><a href="menu1.jsp">Menu1</a></td>
</tr>
<tr>
<td><a href="menu2.jsp">Menu2</a></td>
</tr>
<tr>
<td><a href="menu3.jsp">Menu3</a></td>
</tr>
<tr>
<td><a href="menu4.jsp">Menu4</a></td>
</tr>
<tr>
<td><a href="menu5.jsp">Menu5</a></td>
</tr>
<tr>
<td><a href="menu6.jsp">Menu6</a></td>
</tr>
<tr>
<td><a href="menu7.jsp">Menu7</a></td>
</tr>
<tr>
<td><a href="menu8.jsp">Menu8</a></td>
</tr>
</table>
</td>
<td>
<form name="form1" action="UserServlet.do?method=logout" method="post">
<table width="200" border="5">
<tr>
<td colspan="2">登录成功</td>
<tr>
<td>欢迎你,</td>
<td><%=(String) session.getAttribute("username")%></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="退出"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
//下面是JavaBeans文件
//DBAccess.java
package com.demo.javabean;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DBAccess {
private String drv = "org.gjt.mm.mysql.Driver";
private String url = "jdbc:mysql://localhost:3306/demo";
private String usr = "root";
private String pwd = "root";
private Connection conn = null;
private Statement stm = null;
private ResultSet rs = null;
public boolean createConn() {
boolean b = false;
try {
Class.forName(drv).newInstance();
conn = DriverManager.getConnection(url, usr, pwd);
b = true;
} catch (SQLException e) {
} catch (ClassNotFoundException e) {
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {
}
return b;
}
public boolean update(String sql) {
boolean b = false;
try {
stm = conn.createStatement();
stm.execute(sql);
b = true;
} catch (Exception e) {
System.out.println(e.toString());
}
return b;
}
public void query(String sql) {
try {
stm = conn.createStatement();
rs = stm.executeQuery(sql);
} catch (Exception e) {
}
}
public boolean next() {
boolean b = false;
try {
if(rs.next())b = true;
} catch (Exception e) {
}
return b;
}
public String getValue(String field) {
String value = null;
try {
if(rs!=null)value = rs.getString(field);
} catch (Exception e) {
}
return value;
}
public void closeConn() {
try {
if (conn != null)
conn.close();
} catch (SQLException e) {
}
}
public void closeStm() {
try {
if (stm != null)
stm.close();
} catch (SQLException e) {
}
}
public void closeRs() {
try {
if (rs != null)
rs.close();
} catch (SQLException e) {
}
}
public Connection getConn() {
return conn;
}
public void setConn(Connection conn) {
this.conn = conn;
}
public String getDrv() {
return drv;
}
public void setDrv(String drv) {
this.drv = drv;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public ResultSet getRs() {
return rs;
}
public void setRs(ResultSet rs) {
this.rs = rs;
}
public Statement getStm() {
return stm;
}
public void setStm(Statement stm) {
this.stm = stm;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getUsr() {
return usr;
}
public void setUsr(String usr) {
this.usr = usr;
}
}
//UserBean.java
package com.demo.javabean;
public class UserBean {
public boolean valid(String username, String password) {
boolean isValid = false;
DBAccess db = new DBAccess();
if(db.createConn()) {
String sql = "select * from user where username='"+username+"' and password='"+password+"'";
db.query(sql);
if(db.next()) {
isValid = true;
}
db.closeRs();
db.closeStm();
db.closeConn();
}
return isValid;
}
public boolean isExist(String username) {
boolean isExist = false;
DBAccess db = new DBAccess();
if(db.createConn()) {
String sql = "select * from user where username='"+username+"'";
db.query(sql);
if(db.next()) {
isExist = true;
}
db.closeRs();
db.closeStm();
db.closeConn();
}
return isExist;
}
public void add(String username, String password, String email) {
DBAccess db = new DBAccess();
if(db.createConn()) {
String sql = "insert into user(username,password,email) values('"+username+"','"+password+"','"+email+"')";
db.update(sql);
db.closeStm();
db.closeConn();
}
}
}
//UserServlet.java
package com.demo.servlet;
import java.io.IOException;
import java.io.PrintWriter;
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 com.demo.javabean.UserBean;
public class UserServlet extends HttpServlet {
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String method = (String)request.getParameter("method");
if(method==null) {
PrintWriter out = response.getWriter();
out.println("invalid request!");
} else if(method.equals("login")) {
Login(request, response);
} else if(method.equals("logout")) {
Logout(request, response);
} else if(method.equals("register")) {
Register(request, response);
}
}
protected void Login(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// get parameters
String username = request.getParameter("username");
String password = request.getParameter("password");
// check null
if (username == null || password == null) {
response.sendRedirect("login.jsp");
return;
}
// validate
UserBean userBean = new UserBean();
boolean isValid = userBean.valid(username, password);
if (isValid) {
HttpSession session = request.getSession();
session.setAttribute("username", username);
response.sendRedirect("welcome.jsp");
return;
} else {
response.sendRedirect("login.jsp");
return;
}
}
protected void Logout(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
session.removeAttribute("username");
response.sendRedirect("login.jsp");
}
protected void Register(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// get parameters
String username = request.getParameter("username");
String password1 = request.getParameter("password1");
String password2 = request.getParameter("password2");
String email = request.getParameter("email");
// check null
if (username == null || password1 == null || password2 == null || !password1.equals(password2)) {
response.sendRedirect("register.jsp");
return;
}
// validate
UserBean userBean = new UserBean();
boolean isExist = userBean.isExist(username);
if(!isExist) {
userBean.add(username, password1, email);
response.sendRedirect("login.jsp");
return;
} else {
response.sendRedirect("register.jsp");
return;
}
}
}
//web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>UserServlet</servlet-name>
<servlet-class>com.demo.servlet.UserServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserServlet</servlet-name>
<url-pattern>/UserServlet.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
这里还有上传的源代码。
//数据库创建语句:
create database demo ;
use demo;
create table user(
username varchar(255) not null,
password varchar(255) ,
email varchar(255)
);
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'login.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form name="form1" action="UserServlet.do?method=login" method="post">
<table width="200" border="1">
<tr>
<td colspan="2">登录窗口</td>
<tr>
<td>用户名</td>
<td><input type="text" name="username" size="10"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password" size="10"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="登录"> <a
href="register.jsp">注册新用户</a></td>
</tr>
</table>
</form>
</body>
</html>
//register.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'register.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form name="form1" action="UserServlet.do?method=register" method="post">
<table width="200" border="1">
<tr>
<td colspan="2">注册窗口</td>
<tr>
<td>用户名</td>
<td><input type="text" name="username" size="10"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password1" size="10"></td>
</tr>
<tr>
<td>确认密码</td>
<td><input type="password" name="password2" size="10"></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" size="10"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="提交注册"> <a
href="login.jsp">返回</a></td>
</tr>
</table>
</form>
</body>
</html>
//logout.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'welcome.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<table width="100%">
<tr>
<td><img src="images/logo4.png"></td>
<td><img src="images/logo2.png" height="90"></td>
</tr>
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><a href="welcome.jsp">Main</a></td>
</tr>
<tr>
<td><a href="menu1.jsp">Menu1</a></td>
</tr>
<tr>
<td><a href="menu2.jsp">Menu2</a></td>
</tr>
<tr>
<td><a href="menu3.jsp">Menu3</a></td>
</tr>
<tr>
<td><a href="menu4.jsp">Menu4</a></td>
</tr>
<tr>
<td><a href="menu5.jsp">Menu5</a></td>
</tr>
<tr>
<td><a href="menu6.jsp">Menu6</a></td>
</tr>
<tr>
<td><a href="menu7.jsp">Menu7</a></td>
</tr>
<tr>
<td><a href="menu8.jsp">Menu8</a></td>
</tr>
</table>
</td>
<td>
<form name="form1" action="UserServlet.do?method=logout" method="post">
<table width="200" border="5">
<tr>
<td colspan="2">登录成功</td>
<tr>
<td>欢迎你,</td>
<td><%=(String) session.getAttribute("username")%></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" value="退出"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
//下面是JavaBeans文件
//DBAccess.java
package com.demo.javabean;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DBAccess {
private String drv = "org.gjt.mm.mysql.Driver";
private String url = "jdbc:mysql://localhost:3306/demo";
private String usr = "root";
private String pwd = "root";
private Connection conn = null;
private Statement stm = null;
private ResultSet rs = null;
public boolean createConn() {
boolean b = false;
try {
Class.forName(drv).newInstance();
conn = DriverManager.getConnection(url, usr, pwd);
b = true;
} catch (SQLException e) {
} catch (ClassNotFoundException e) {
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {
}
return b;
}
public boolean update(String sql) {
boolean b = false;
try {
stm = conn.createStatement();
stm.execute(sql);
b = true;
} catch (Exception e) {
System.out.println(e.toString());
}
return b;
}
public void query(String sql) {
try {
stm = conn.createStatement();
rs = stm.executeQuery(sql);
} catch (Exception e) {
}
}
public boolean next() {
boolean b = false;
try {
if(rs.next())b = true;
} catch (Exception e) {
}
return b;
}
public String getValue(String field) {
String value = null;
try {
if(rs!=null)value = rs.getString(field);
} catch (Exception e) {
}
return value;
}
public void closeConn() {
try {
if (conn != null)
conn.close();
} catch (SQLException e) {
}
}
public void closeStm() {
try {
if (stm != null)
stm.close();
} catch (SQLException e) {
}
}
public void closeRs() {
try {
if (rs != null)
rs.close();
} catch (SQLException e) {
}
}
public Connection getConn() {
return conn;
}
public void setConn(Connection conn) {
this.conn = conn;
}
public String getDrv() {
return drv;
}
public void setDrv(String drv) {
this.drv = drv;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public ResultSet getRs() {
return rs;
}
public void setRs(ResultSet rs) {
this.rs = rs;
}
public Statement getStm() {
return stm;
}
public void setStm(Statement stm) {
this.stm = stm;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getUsr() {
return usr;
}
public void setUsr(String usr) {
this.usr = usr;
}
}
//UserBean.java
package com.demo.javabean;
public class UserBean {
public boolean valid(String username, String password) {
boolean isValid = false;
DBAccess db = new DBAccess();
if(db.createConn()) {
String sql = "select * from user where username='"+username+"' and password='"+password+"'";
db.query(sql);
if(db.next()) {
isValid = true;
}
db.closeRs();
db.closeStm();
db.closeConn();
}
return isValid;
}
public boolean isExist(String username) {
boolean isExist = false;
DBAccess db = new DBAccess();
if(db.createConn()) {
String sql = "select * from user where username='"+username+"'";
db.query(sql);
if(db.next()) {
isExist = true;
}
db.closeRs();
db.closeStm();
db.closeConn();
}
return isExist;
}
public void add(String username, String password, String email) {
DBAccess db = new DBAccess();
if(db.createConn()) {
String sql = "insert into user(username,password,email) values('"+username+"','"+password+"','"+email+"')";
db.update(sql);
db.closeStm();
db.closeConn();
}
}
}
//UserServlet.java
package com.demo.servlet;
import java.io.IOException;
import java.io.PrintWriter;
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 com.demo.javabean.UserBean;
public class UserServlet extends HttpServlet {
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String method = (String)request.getParameter("method");
if(method==null) {
PrintWriter out = response.getWriter();
out.println("invalid request!");
} else if(method.equals("login")) {
Login(request, response);
} else if(method.equals("logout")) {
Logout(request, response);
} else if(method.equals("register")) {
Register(request, response);
}
}
protected void Login(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// get parameters
String username = request.getParameter("username");
String password = request.getParameter("password");
// check null
if (username == null || password == null) {
response.sendRedirect("login.jsp");
return;
}
// validate
UserBean userBean = new UserBean();
boolean isValid = userBean.valid(username, password);
if (isValid) {
HttpSession session = request.getSession();
session.setAttribute("username", username);
response.sendRedirect("welcome.jsp");
return;
} else {
response.sendRedirect("login.jsp");
return;
}
}
protected void Logout(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
session.removeAttribute("username");
response.sendRedirect("login.jsp");
}
protected void Register(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// get parameters
String username = request.getParameter("username");
String password1 = request.getParameter("password1");
String password2 = request.getParameter("password2");
String email = request.getParameter("email");
// check null
if (username == null || password1 == null || password2 == null || !password1.equals(password2)) {
response.sendRedirect("register.jsp");
return;
}
// validate
UserBean userBean = new UserBean();
boolean isExist = userBean.isExist(username);
if(!isExist) {
userBean.add(username, password1, email);
response.sendRedirect("login.jsp");
return;
} else {
response.sendRedirect("register.jsp");
return;
}
}
}
//web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>UserServlet</servlet-name>
<servlet-class>com.demo.servlet.UserServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserServlet</servlet-name>
<url-pattern>/UserServlet.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
这里还有上传的源代码。
//数据库创建语句:
create database demo ;
use demo;
create table user(
username varchar(255) not null,
password varchar(255) ,
email varchar(255)
);
- loginjsp.rar (66.3 KB)
- 下载次数: 76
发表评论
-
Servlet上传文件
2012-02-07 23:58 1492准备工作:要到http://commons.apache.or ... -
成为Java高手需要达到的25个学习目标--经典
2012-01-29 16:07 1349本文将告诉你学习Java需 ... -
Timer, Quartz 和 Spring 实现作业调度
2011-11-28 15:43 1174一、java.util.Timer ... -
Java 产生不重复的随机数
2011-06-22 23:32 2359int numberCount = 6; ... -
Date类学习总结(Calendar Date 字符串 相互转换 格式化)
2011-06-20 16:12 1662Date类学习总结 1.计算某一月份的最大天数 ... -
jsp中的cookie用法小实例
2011-06-20 00:13 2491这个小实例有三个页面 index.jsp页面内容如下: Y ... -
JS实现简单的增删改查
2011-06-19 23:41 12962<%@ page language="ja ... -
Jsp 动态显示系统时间
2011-06-19 23:24 4899<%@ page language=" ... -
java 动态显示时间
2011-06-19 23:13 4058import java.util.Date; p ... -
js 动态显示时间
2011-06-19 22:53 1831<%@ page language=" ... -
HTML 显示系统时间
2011-06-19 22:13 7887代码1:(显示静态时间) <script type=& ... -
JavaScript 动态显示系统时间
2011-06-19 19:36 2080JavaScript 动态显示系统时间 <html ... -
两例JavaScript 获取当前系统日期和时间
2011-06-19 19:20 1252两例JavaScript 获取当前系统日期和时间 QUOTE ... -
java五种JSP页面跳转方法详解
2011-06-19 17:08 14761. RequestDispatcher.forward() ... -
Java Object方法
2011-06-19 16:47 1351package com.abin.test.connectio ... -
Java 数组,List,Itarator循环
2011-06-19 16:01 2303package com.abin.test.connect ... -
JAVA DBClass操作数据库,这样算不算单列模式
2011-06-19 14:53 1254到底怎样才算单列模式,单列模式事什么概念 package c ... -
Oracle日期函数集锦
2011-06-16 20:55 929Oracle日期函数集锦(一) 一、 常用日期数据格式 1 ... -
java 页面传送数组
2011-06-15 14:56 25951.可以通过嵌入java代码调用session或者reques ... -
java Calendar当前时间
2011-06-14 13:40 1663Calendar c = Calendar.getIn ...
相关推荐
Jsp+JavaBean+Servlet(MVC设计模式)的寝室管理系统 Jsp+JavaBean+Servlet(MVC设计模式)的寝室管理系统 Jsp+JavaBean+Servlet(MVC设计模式)的寝室管理系统
**JSP+Servlet+JavaBean+JDBC简单登录实例详解** 在Web开发中,构建一个用户登录系统是常见的需求。本实例将详细讲解如何利用JavaServer Pages (JSP)、Servlet、JavaBean以及Java Database Connectivity (JDBC) 来...
【标题】"jsp+JavaBean+Servlet+MySQL宿舍管理系统(初学者)"是一个针对初学者设计的项目,旨在帮助他们理解并实践Web应用开发的基本技术。这个系统的核心是使用JSP(JavaServer Pages)来展示界面,JavaBean作为业务...
jsp+javabean+servlet使用简单的MVC模式实现登录注册、留言板、分页的功能。model(javabean)层实现读写数据库,数据库名为webapp,没有密码;view(JSP)实现展示信息;controller(servlet)层联系model和view,...
登录和注册的jsp页面+servlet+javaBean登录和注册的jsp页面+servlet+javaBean登录和注册的jsp页面+servlet+javaBean登录和注册的jsp页面+servlet+javaBean登录和注册的jsp页面+servlet+javaBean登录和注册的jsp页面+...
本项目“jsp+Servlet+javaBean实现登录注册”采用经典的Web开发技术栈,包括JavaServer Pages (JSP)、Servlet以及JavaBeans,结合MySQL数据库,利用集成开发环境myEclipse进行开发。下面将详细阐述这些知识点。 1. ...
开发者可以将JavaBean实例化并注入到JSP或Servlet中,以处理请求和响应,例如处理用户的登录验证、购物车操作等。 **Servlet** Servlet是Java平台上的服务器端程序,用于扩展Web服务器的功能。在本项目中,Servlet...
《基于JSP+JavaBean+Servlet模式的图书管理系统的研究与实现》 图书管理系统是信息化建设中的重要组成部分,它能够高效地管理和检索图书信息,为图书馆的日常运营提供便利。本项目采用经典的JSP(JavaServer Pages...
《图书管理系统:基于jsp+javabean+servlet的实现》 在信息技术日益发达的今天,图书管理系统的构建已经成为图书馆信息化建设的重要组成部分。本系统采用jsp、javabean和servlet技术进行开发,旨在提供高效、便捷的...
【标题】基于JSP+Servlet+JavaBean实现的图书管理系统 在Web开发中,JSP(JavaServer Pages)、Servlet和JavaBean是常见的技术栈,它们共同构建了动态、交互式的Web应用程序,尤其适用于构建功能丰富的图书管理系统...
【JSP+Servlet+JavaBean的新闻发布系统】是一种基于Java技术的Web开发模式,主要用于构建动态网站。这个项目的核心在于将展示逻辑(JSP)、控制逻辑(Servlet)和业务逻辑(JavaBean)进行分离,实现了MVC(Model-...
【jsp+javabean+servlet库存管理系统】是一个基于Java Web技术构建的企业级应用,主要用于实现高效、精确的库存管理。这个系统充分利用了JSP(JavaServer Pages)、Servlet和JavaBean等核心组件,构建了一个功能丰富...
Servlet+JSP+JavaBean(MVC)模式适合开发复杂的web应用,在这种模式下,servlet负责处理用户请求,jsp负责数据显示,javabean负责封装数据。 Servlet+JSP、JavaBean模式程序各个模块之间层次清晰,web开发推荐采用此...
【标题】:“jsp+servlet+javabean学生信息管理系统”是一种基于Web的教育管理软件,它结合了三种核心技术——JavaServer Pages(JSP)、Servlet和JavaBeans,用于实现对学生信息的有效管理和操作。这个系统旨在提高...
在IT行业中,构建Web应用程序是常见的任务之一,而JSP(JavaServer Pages)、JavaBean和Servlet是Java Web开发中的核心技术,常用于构建动态网站。本项目利用这些技术实现了用户注册和登录的功能,以下是对这些技术...
在机票预订系统中,Servlet作为控制器接收用户请求,然后调用JavaBean进行业务处理,最后更新或者转发到适当的JSP页面显示结果。 - 分工:JSP不再直接处理业务逻辑,而是专注于展示。Servlet根据用户请求,调用...
这是个 JSP+JAVABEAN +SERVLET 完整的java 企业日常事务管理系统项目源码 可以直接导入没有eclipse、myeclipse。内附数据库文件 mysql版,也可改成其它数据库, 换对应数据库连接驱动和修改sql语法即可