Struts2 获取表单请求参数
来源:互联网 发布:藏刀不能在淘宝卖 编辑:程序博客网 时间:2024/05/01 14:09
1、建 CustomerAction.java
public class CustomerAction extends ActionSupport implements Serializable{private Integer id;// 属性对应表单中的name 值private String name;// 属性对应表单中的name 值封装……public String addCustomer(){S.O.P ("ID:"+id+"\tNAME:"+name);try{return SUCCESS;}catch(Exception e){return ERROR;}}}2、建页面 add.jsp
* 控件中 name 属性名必须和 Action 中需要赋值的属性名称一致
<form action="${pageContext.request.contextPath}/customer/addCustomer" method="post"># action=/项目名/namespace名/action名ID:<input type="text" name="id"><br/>NAME:<input type="text" name="name"><br/><input type="submit" value="保存"></form>3、访问
localhost:8080/项目名/namespace名/add.jsp 可以添加数据
0 0
- Struts2 获取表单请求参数
- Struts2中获取请求参数
- struts2中获取请求参数
- struts2拦截器获取http请求参数
- 在struts2中获取请求参数
- Struts2 HttpServletRequest获取请求参数的过程
- struts2中获取请求参数 笔记
- Servlet获取请求参数、表单验证(2015.9.15)
- JFinal form表单提交请求参数的获取问题
- Spring MVC 接收POST表单请求,获取参数总结
- struts2中 Action获取表单参数的几种方式
- struts2中 Action获取表单参数的几种方式
- struts2中 Action获取表单参数的几种方式
- struts2中 Action获取表单参数的几种方式
- 【问题】struts2中Action的请求参数获取
- 在struts2中获取请求action名称或参数
- struts2获取请求参数-----属性驱动3种
- Struts2获取表单数据
- HttpUrlConnection编程
- Java虚拟机类加载机制
- 查询比本部门平均工资高的员工信息
- win8装驱动装不上。。转自网上。。感谢网友。。分享出来
- 接口
- Struts2 获取表单请求参数
- IO流
- nyoj 801 Haffman编码
- HDU 1715 大菲波数 (java)
- properties
- Struts2 级联数据传递
- Android android:gravity和android:layout_gravity的区别以及android:visibility的作用
- 接口回调
- AndroidUI 布局动画-为布局添加动画