Vita Rara: A Life Uncommon

How to Send form data to DAO Layer.

Hi,
I Just started workign with Struts2.
Here is my doubt.

Assume that i am developing a loing application where user enters username and password, i have the setter/getter methods in my action for username& password.

Form action i have to invoke the Service/DAO method, which takes a Value Object as paramater, which contains username& password.

Here is few Questions:

=> Why can't we have a seperate bean for form properties and map it to the action class.
=> If the properties are defined in Action class, what is the right place to create the Value object (in my example with username& password).

Any Suggestions....

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options