I have array containing simple integers . I want to display these integers
on another page using
struts's <logic:iterate> tag.How can i display?/*
package com.myapp.struts;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
public class loginform extends org.apache.struts.action.ActionForm {
private int array [];
private
String gender;
private String text;
private String text1;
public void setArray() {
int array[]={1,2};
}
public int[] getArray() {
return (this.array);
}
public void setGender(String gender) {
this.gender = gender;
}
public String getGender() {
return (this.gender);
}
public String getText() {
return text;
}
public void setText(String string) {
text = string;
}
public String getText1() {
return text1;
}
public void setText1(String string) {
text1 = string;
}
public loginform() {
super();
// TODO Auto-generated constructor stub
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (getText() == null || getText().length() < 1) {
errors.add("text", new ActionMessage("error.text.required"));
// TODO: add 'error.name.required' key to your resources
}
if (getText1() == null || getText1().length() < 1) {
errors.add("text1", new ActionMessage("error.text1.required"));
// TODO: add 'error.name.required' key to your resources
}
return errors;
}
}
Here is my form bean
Thanks in advance