Struts 1.3 how to send data from database to the jsp page!
Hi everyone, and sorry if it isn't the right zone to explain my problem.
I've completed a registration form , with all the personal data and it works!(successfuly save on the database)
Then the LoginForm. I submit username and password, and it works too.
But now there's my problem: i want to see the message welcome "user" in the other jsp pages, where user is his name saved in the db.
(i 'm not allowed to use java code on the jsp)
Now in my LoginAction class i m calling a method
User user = daoFactory.userDAO().checkLogin(loginform.getUserN ame(),loginform.getPassword(),connection);
where checklogin is a method with the query on the db, userName and password are the data that i submited!
and it 'll return a object user with all the information i need.
(i saw it on the debug!)
But now i don t know how to pass this information on the jsp.
Welcome <bean:write name="LoginForm" property="userName" />
but it works only with the informations i passed by keyboard
//a= loginform.setName(user.getFirstName()); and changed username with a but nothing:i had
this error: No getter method for property
Probably i miss something but i don t know what. Can someone say me how to pass the user information on the jsp?