摘要: (1)首先要引入需要pom文件 (2)需要的数据,返回什么类型的都可以 (3)配置action result节点中的name:返回的值 type:返回序列化的格式 root:要序列化的对象 默认将序列化当前Action中所有有返回值的getter方法的值 list( 要返回页面的数据 在action 阅读全文
posted @ 2018-11-15 15:16 裸熊很酷 阅读(1168) 评论(0) 推荐(0) 编辑
摘要: 自动装配 1.根据属性的getter和setter获取值 index.jsp 在后台我们需要封装两个字段,字段的名字就跟文本框的name值一样即可,注意要有getter和setter方法,否则映射不到,就获取不到值 HelloAction: struts.xml 这样就可以回去前台传过来的值,输出结 阅读全文
posted @ 2018-11-15 14:35 裸熊很酷 阅读(253) 评论(0) 推荐(0) 编辑