本案例借鉴了其他人的博客,且做了一些修改,采用spring4.3.8版本即可
项目结构如下:
导包:
访问项目中的jsp页面地址:http://localhost:8000/spring_check/test.jsp
test.jsp如下:
<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>三个验证码测试</title>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/&