using <S:URL> to retrieve
<s:url action="myAction" namespace="/myhome" method="display"/>
***************************************************************
using <S:SUBMIT> to save
<s:submit value="Save" method="save"/>
################################################################
public class MyAction extends ActionSupport {
private Employee emp;
public String execute() throws Exception{
return SUCCESS;
}
public String save() throws Exception{
//code to save data
return SUCCESS;
}
public String display() throws Exception{
//code to retrieve data
return SUCCESS;
}
public void setEmp(Employee emp) {
this.emp=emp;
}
public Employee getEmp() {
return this.emp;
}
}
#################################################################
<action name="myAction" class="com.myhome.action.MyAction">
<result name="input">/myhome/employeeDtl.jsp</result>
<result >/myhome/employeeDtl.jsp</result>
</action>
#################################################################
what I want??
when I will call employeeDtl.jsp for first time it will retrieve data and populate the form
with all values.I may change the values corresponding to the Employee object and then submit
to save updated values.