Hi , this is Praveen ..
I developed one application which ,
admin enters login username and passwords .
These credentials will be checked through database using Hibernate . After validating the credentials It enters into AddStudent page ,
I used DynaActionForm insted of ActionForms .
In my Appli .. loginForm ---> DynaActionForm
addStudentForm --->DynaActionForm
--------
If I used code Like this in LoginAction
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ActionErrors errors = new ActionErrors();
ActionForward forward = new ActionForward();
DynaActionForm loginForm = (DynaActionForm)form;
String un = (String)loginForm.get("username");
String pass = (String)loginForm.get("password");
System.out.println(" == User Name and Password ===="+un+"=="+pass);
------------
username and passwords are Properties of loginForm which is DynaActionForm .
In this Action I am getting username ,password values ,
This same concept I used in SaveStudenAction
like this
String fn = (String)dynaActionForm.get("firstName");
System.out.println(" ---Enter : saveUserDelegate -- fn "+fn);
Here firstName is userForm property which is declared in struts-config.xml , (becoz It is DynaActionForm )
Here I am not getting values
Plz Help me URGENT