Subhadip Pal

Greenhorn
+ Follow
since Feb 17, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Subhadip Pal

Hi Steve,
can you please post the Struts-config.xml and Action class as well...
14 years ago
Hi Ankit,
I have already created the application.But got stuck at this point.
Actually when I fetching the data into a list from datbase using hibernate.

I am using

List<Employee> list = query.list();

As each element of the list contains a Employee object and due to these multiple objects i am facing problem .

I case there is only one row returned from the database I can assign these data from DTO into the
ActionForm class variables and then diaplay the form in the jsp using

<html:text property="name"> etc. etc..

but i cant do it as i dont know how many such employee objects .

Please suggest a soln. for the same...if possible..
Please suggest me a link to study the same
14 years ago
Hi Priya,
It seems that the jars are not included in your java build path.
I suppose youu should download the struts-2.1.8.1-lib.zip from "http://apache.siamwebhosting.com/struts/library/struts-2.1.8.1-lib.zip".
Then put all those jars in your WEB-INF/lib folder then if your are using eclipse and add those jars in your web application build path.
Start the server and try to hit the application.
I guess it will be okay
14 years ago
In my application, I want to display all the rows from a table in a JSP.
The data that is to be shown should be populated in text boxes.

A user when successfully logs into the application will be able to view the Database table contents in the JSP Page, he can also modify the values from the Text boxes.
On clicking submit, the user should be able to post the whole of the Form will all the values altogether and the new values should be updated in the database.

Can you suggest a suitable approach for the same?

illustration :-

lets say we have an Employee table
table contents:-


EmpId Name Address Phone
--------------------------------------------------------------
231312 xyz213123 dasdas 0909090
324234 abc213123 asdas 0990898


now we need to display all the data (note the no. of rows are not constant) in the JSP inside the text boxes.
The user will be able to modify the data that is being displayed and on clicking submit the new data will be updated in the database.


I have build the application using Struts 1.2.7 and Hibernate 3.0.




14 years ago