Thanks Suman
I have tried the same code you have written below but my page was not displayed when I added the line
<html:form action="/actionName"> so I felt I was wrong somewhere. I will try again.
Below is the code.
I am using struts1.3.10
**********************************
This is my Action class
**********************************
public class ViewCelebrity extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)throws Exception{
List listLoginData = new ArrayList();
SessionFactory sessionFactory;
Session session;
Transaction transaction;
Configuration configuration;
Query query;
try {
LoginForm loginForm = new LoginForm();
sessionFactory=new Configuration().configure().buildSessionFactory();
session=sessionFactory.openSession();
transaction=session.beginTransaction();
query = session.createQuery("from LoginForm loginData");
listLoginData = query.list();
request.setAttribute("listLoginData", listLoginData);
}
catch(Exception e){
e.printStackTrace();
}
return mapping.findForward("success");
}//end of execute
}
****************************************
This is my ActionForm calss
****************************************
public class LoginForm extends ValidatorForm{
private
String userName;
private String passWord;
private String pin;
private String reType;
public void setUserName(String userName){
this.userName = userName;
System.out.println("Inside setUserName");
}
public void setPassWord(String passWord){
this.passWord = passWord;
System.out.println("Inside setPassWord");
}
public void setPin(String pin){
this.pin = pin;
System.out.println("Inside setPin");
}
public void setReType(String reType){
this.reType = reType;
System.out.println("Inside setReType");
}
public String getUserName(){
System.out.println("Inside getUserName");
return userName;
}
public String getPassWord(){
System.out.println("Inside getPassWord");
return passWord;
}
public String getPin(){
System.out.println("Inside getPin");
return pin;
}
public String getReType(){
System.out.println("Inside getReType");
return reType;
}
public void reset(){
}
}
*******************************************
This is my .jsp page
*******************************************
<tiles:insert attribute="header"/>
<table bgcolor="green" width="100%">
<tr>
<td>User Name</td>
<td>Password</td>
<td>Pin</td>
</tr>
<logic:iterate id="cele" name="listLoginData">
<tr>
<html:form action="/action">
<td><bean:write name="cele" property="userName" /></td>
<td><bean:write name="cele" property="passWord"/></td>
<td><bean:write name="cele" property="pin"/></td>
</html:form>
</tr>
</logic:iterate>
</table>
<tiles:insert attribute="footer"/>
_______________________________________________________________________
I have one more question. I want each row to be placed on different tile and insert the tiles on this page dynamically. How should i do?
Regards
Ann