首先配置web.xml中的strust2的过滤器

 

配置index.jsp实现页面跳转到login.jsp  实现代码

<a href="login.jsp">欢迎访问</a>   编写login.jsp中的form登录表单:

第三步:在strust.xml中编写form表单中的action属性:

编写简单JAVA类:User类

编写LoginAction类

posted on 2018-01-03 09:57  Heng23  阅读(124)  评论(0编辑  收藏  举报