Hi and thanx' for the response.
"but the action you would have used to populate the jsp, would also be used to set the values. actually come to think of it, thats all struts does."
I realize that actions can be used to pre populate a form but I don't realize the power of actions when it comes to read information from a database and display it on a page with just information. Please convince me!
Lets say I have a simple web where a user can logg in and based on the user_id of the user the web displays all registered details about the user that logged in, Name, address etc. No forms are used on the page. Do I gain anything from using struts in this situation?
I have built a model layer with service classes, one of them is a userService that uses Spring to retrieve data from an Oracle database through stored procedures. The service class creates a user object called userDTO and populates this object with all information about a user. This object is returned to my userBean class and made available to the JSP page through the user of jsp:useBean and jsp:getProperty. If I use an action class the action class can call the service class instead and retrieve the userDTO object. If I were to populate a form I would set the attributes of my actionform to the values from the userDTO and have my form pre-populated.
What do I do when I don't have a form to populate?
How can I make my userDTO object available for my JSP page so I can use the syntax
to display the name of the user?
Ps. I wasn't aware that I chose an inappropriate nickname, I used an abreviation of my first and lastname and it ended up as the bad
word, I have changed it =)
Thankyou for your time.
//PA