1. 程式人生 > >Struts_登錄練習(未配置攔截器)

Struts_登錄練習(未配置攔截器)

struts mode 分享圖片 技術 imp dao hibernate 截器 使用

1、在domain中建個User.java和其配置文件

技術分享圖片

技術分享圖片

並在hibernate.cfg.xml中加入配置

技術分享圖片

2、配置struts文件

技術分享圖片

3、在jsp文件中修改action地址和name屬性,並標註錯誤信息

技術分享圖片

技術分享圖片

4、新建action,使用modeldriven封裝

技術分享圖片

5、新建serviceimpl,並拋出異常信息

技術分享圖片

6、新建daoimpl

技術分享圖片

Struts_登錄練習(未配置攔截器)