<form action="admin/Category-update" method="post">
<input type="hidden" name="category.id" value="id">
<!--此处的拿到的id怎么转换成整形提交到下一页面-->
name:<input type="text" name="category.name" />
description:<input type="text" name="category.description" />
<input type="submit" value="update" />
<s:debug></s:debug>
Category.java
public class Category {
private int id;
private String name;
private String description;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}