本篇文章延续上次SSH整合之后,并非独立的项目代码。
SSH整合文章地址:SSH整合简单粗暴有效
要登录肯定要先有一个相应的界面 login.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@page isELIgnored="false"%>
<div style="margin:0px auto; width:500px">
<form action="login" method="post">
name: <input name="adminuser.name"> <br>
pwd: <input name="adminuser.pwd"> <br>
<button type="submit">login</button>
</form>
</div>
根据form表单中的action我们编写struts.xml
在xml中添加