I am newbie to Struts. I have a doubt on ActionForm in Struts.
What is the exact use of actionForm? If it is used to store user specific data coming from HttpRequest then why can't we use HttpSession?
If it performs simple validations cant we use javacript for the same? And is it compulsary to use ActionForm?
vaidehi Agate-keskar wrote:What is the exact use of actionForm?
it gives the form input datas to the Action and vice versa . it is a bridge between the view and action.default it is in request scope. and mainly you should not put every thing into the session
vaidehi Agate-keskar wrote:If it performs simple validations cant we use javacript for the same?
you should not relay on client side validation
vaidehi Agate-keskar wrote:And is it compulsary to use ActionForm?
No.but preferable
vaidehi Agate-keskar
Greenhorn
Joined: Apr 18, 2009
Posts: 12
posted
0
Thanks seetharaman.
you should not put every thing into the session
Can you explain it in a bit detail?
And if it is not complusary to use actionForm but preferable, what else we can write instead of action form?
vaidehi Agate-keskar wrote:
you should not put every thing into the session
Can you explain it in a bit detail?
one session per user .it is representation of an user [commonly contains user specification details] . if you put extra thing into that ,it may hit your web application performance ,if more users.
vaidehi Agate-keskar wrote:
And if it is not complusary to use actionForm but preferable, what else we can write instead of action form?
use <form> instead of <html:form> and validation="false" make it in your <action> tag of your struts-config xml