jdbc.properties
struts.properties
test.jsp
在Eclipse中run 这个工程on server,在浏览器中输入网址:http://localhost:8080/SSH/add.do
console输出:
....
信息: Server startup in 4359 ms
Hibernate: /* insert vo.User */ insert into users (optlock, name) values (?, ?)
Hibernate: /* named HQL query User.findAll */ select user0_.id as id0_, user0_.optlock as optlock0_, user0_.name as name0_ from users user0_
说明用户的数据已经成功存储到了mysql当中,可以查看mysql的test数据库的users表,已经存在一条记录:(id,optlock,name)=(1,0,hello)
浏览器界面显示:
至此一个最简单的SSH开发环境就搭建起来啦~~~~~~(*^__^*) 嘻嘻……