在JSP页面中:
<s:textarea placeholder="请输入正文" class="bookcontent" name="bookcontent"></s:textarea>
在后台需要获取数据:
String bookcontent = ServletActionContext.getRequest().getParameter("bookcontent");
而直接使用getter/setter不能获取,为null
private String bookcontent;public String getbookcontent() {return bookcontent;}
public void setbookcontent(String bookcontent) {this.bookcontent = bookcontent;}