anvesh...@gmail.com
unread,Jan 12, 2015, 6:21:51 AM1/12/15You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I am using hibernate (many to many mapping) along with struts2.
In my model class below, i have strings and collections, which are read from DataBase using HQL. I
public class Test_Tools {
private int testToolID;
private String toolName;
private Collection<Application_Type> applicationTypes;
private Collection<Browser> browsers;
public Test_Tools() {
}
public int getTestToolID() {
return testToolID;
}
public void setTestToolID(int testToolID) {
this.testToolID = testToolID;
}
public String getToolName() {
return toolName;
}
public void setToolName(String toolName) {
this.toolName = toolName;
}
public Collection<Application_Type> getApplicationTypes() {
return applicationTypes;
}
public void setApplicationTypes(Collection<Application_Type> applicationTypes) {
this.applicationTypes = applicationTypes;
}
public Collection<Browser> getBrowsers() {
return browsers;
}
public void setBrowsers(Collection<Browser> browsers) {
this.browsers = browsers;
}
}
Here is my action class:
public class ReadToolsList extends ActionSupport implements SessionAware {
private Collection<Test_Tools> TestingToolsList = new ArrayList<Test_Tools>();
Map Session;
ReadToolsListLogic RDT = new ReadToolsListLogic();
public String toolsList() {
setTestingToolsList(RDT.readToolsLogic());
return Action.SUCCESS;
}
public String browserOpen() {
return Action.SUCCESS;
}
@Override
public void setSession(Map arg0) {
// TODO Auto-generated method stub
}
public Map getSession() {
return Session;
}
public Collection<Test_Tools> getTestingToolsList() {
return TestingToolsList;
}
public void setTestingToolsList(Collection<Test_Tools> testingToolsList) {
TestingToolsList = testingToolsList;
}
}
Now I want to print the records read from the DB in jsp page using display tag along with collections.
Please provide me with a sample code.