values between beans
Hi all,
got question about giving variables to Beans
i'v got LoginForm bean with session scope where user login and 'user' entity is set in this bean. on another page i use bean AccountController (scope=request) to addAccount but i don't now how to give the entity 'user' from LoginForm to AccountController. I tried to use jsp:useBean class="bean.AccountController" and setProperty but that create another instance of AccountController and give the entity to it instad of set the right variable in original bean.
Does anybody know how to do it?
<jsp:useBean class="bean.AccountController" id="AC" scope="request" />
<jsp:setProperty name="AC" property="user" value="${LoginForm.user}" />
<c:out value="$AC.user" /> ----- this prints out 'entity.user[51]'
<c:out value="$AccountController.user"> ------ this prints out 'nothing'
|