tags:

views:

492

answers:

1

If i can use

<td><textarea><bean:write name="smlMoverDetailForm" property="empFDJoiningDate"/>
</textarea></td>

to displace a value how can i use the struts tags to save a vaiable to the sesssion

in sudo code

session.setAttribute("test" , "<bean:write name="smlMoverDetailForm"
property="empFDJoiningDate"/>");

is this possible?

+1  A: 

I don't think so. Struts tags are only available in jsp pages.

But you can do something like this:

if the bean smlMoverDetailForm is in scope request

session.setAttribute("test",((THECLASSOFTHEBEAN)request.getAttribute("smlMoverDetailForm")).getEmpFDJoiningDate());

else if the bean smlMoverDetailForm is in scope session

session.setAttribute("test",((THECLASSOFTHEBEAN)request.getSession().getAttribute("smlMoverDetailForm")).getEmpFDJoiningDate());
Fred