JSP开发模式2_JSP/Servlet/JavaBean(简单注册功能)
摘要:import java.util.regex.Matcher;import java.util.regex.Pattern;public class RegisterBean { private String userName = ""; private String errorName = "";
阅读全文
JSP开发模式1(简单注册功能)
摘要:———————————————————————————————————————————————— import java.util.regex.Matcher;import java.util.regex.Pattern;public class RegisterBean { private Str
阅读全文
EL标签使用
摘要:<%@ page language= "java" contentType="text/html;charset=UTF-8" %><html><head><meta charset="utf-8"><title>EL使用</title></head><body> <% pageContext.se
阅读全文
JSTL标准标签库 (使用foreach打印集合)
摘要:<%@page import="java.util.*"%><%@ page language= "java" contentType="text/html;charset=UTF-8" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" pre
阅读全文
EL使用:打印集合
摘要:<%@page import="java.util.HashMap"%><%@page import="java.util.Map"%><%@page import="java.util.ArrayList"%><%@page import="java.util.List"%><%@ page la
阅读全文
JSP开发模式2(计算器)
摘要:CalculatorBean————————————————————————————————————————————public class CalculatorBean { private String firstNum; private String sencondNum; private St
阅读全文
JSP计算器
摘要:<%@ page language= "java" contentType="text/html;charset=UTF-8" %><html> <head> <meta charset="utf-8"> <title>计算器</title> </head> <body> <hr> <%! doub
阅读全文
在JSP中使用JavaBean
摘要://创建一个PersonBean类 public class PersonBean { private String name; private int age; public PersonBean(){ System.out.println("创建PersonBean类"); } public S
阅读全文
JSP(include指令与<jsp:include>动作的区别)
摘要:<%@ page language= "java" contentType="text/html;charset=UTF-8" %><html> <head> <meta charset="utf-8"> <title>JSPinclude动作实例</title> </head> <body> <%
阅读全文
JSP(include指令)页面
摘要:<%@ page language= "java" contentType="text/html;charset=UTF-8" %><html> <head> <meta charset="utf-8"> <title>包含页面</title> </head> <body> <%@ include
阅读全文
JSP(forward动作)登录功能
摘要:<%@ page language= "java" contentType="text/html;charset=UTF-8" %><html> <head> <meta charset="utf-8"> <title>JSPforward动作实例</title> </head> <body> <f
阅读全文
Servlet 添加购物车
摘要:import java.io.IOException;import java.io.PrintWriter;import java.util.ArrayList;import java.util.Iterator;import javax.servlet.ServletException;impor
阅读全文
获取根路径
摘要:public String getWebContentPath(String projiectName){ String path=Thread.currentThread().getContextClassLoader().getResource("").getPath(); System.out
阅读全文
Servlet 利用Session实现不重复登录
摘要:import java.io.IOException;import java.io.PrintWriter;import java.util.ArrayList;import java.util.Iterator;import java.util.PrimitiveIterator.OfDouble
阅读全文
Servlet 利用Cookie实现一周内不重复登录
摘要:import java.io.IOException;import java.io.PrintWriter;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.se
阅读全文
检测客户端类型
摘要:import java.io.IOException;import java.io.PrintWriter;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.se
阅读全文
JSP中显示用户信息
摘要:<%@ page language= "java" contentType="text/html;charset=UTF-8" %><%@ page import="java.util.*,java.sql.*" %><html> <head> <meta charset="utf-8"> <tit
阅读全文