ContactUs

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

How an actionForm bean is created?

actionForm bean is created by extending the class org.apache.struts.action.ActionForm

In the following example we have created an actionForm bean with the name 'testForm':

[java]

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.*;

public class testForm extends ActionForm

{

private String Id=null;

private String State=null;

public void setId(String id){

this.Id=id;

}

public String getId(){

return this.Id;

}

public void setState(String state){

this.State=state;

}

public String getState(){

return this.State;

}

[/java]

Related Posts Plugin for WordPress, Blogger...
Flag Counter