I have to send object of Bean class back to JSP from my action class. I am instantiating the Bean class in my action class and and setting some values in my Action class.
ElasticitiesVariable elasticitiesVariable = new ElasticitiesVariable();
elasticitiesVariable.setAuto_Auto_cost_peak("-0.047");
elasticitiesVariable.setAuto_Ride_cost_peak("0.000");
elasticitiesVariable.setAuto_Van_cost_peak("0.000");
elasticitiesVariable.setAuto_Transit_cost_peak("0.050");
elasticitiesVariable.setAuto_Bike_cost_peak("0.000");
and in my JSP I am declaring the bean class as well.
<s:bean name="org.apache.struts.register.model.ElasticitiesVariable" var="elasticitiesBean" />
<td class="edit_area">
<s:property value="#elasticitiesBean.auto_Auto_cost_peak" /></td>
in the bean class i have declared the variable private with public getter and setter.
But the values coming null in JSP.
After debugging I found that there is no problem in action class. But when command goes to bean class, values becomes null
.