(1)项目结构图如下:
在web.xml下加入如下内容(strus2的核心过滤器)
在jsp文件引入标签
配置action类(执行其中的execute()方法,返回一个字符串类型)
配置strus.xml文件
(2)运行效果如下
当输入账号和密码错误时:
当输入正确时:
标注:
使用该框架后,较为完美的解决了输入地址就能访问网页的弊端,所有的网页后缀以.action结尾。
(1)项目结构图如下:
在web.xml下加入如下内容(strus2的核心过滤器)
在jsp文件引入标签
配置action类(执行其中的execute()方法,返回一个字符串类型)
配置strus.xml文件
(2)运行效果如下
当输入账号和密码错误时:
当输入正确时:
标注:
使用该框架后,较为完美的解决了输入地址就能访问网页的弊端,所有的网页后缀以.action结尾。