This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Yes I want to assign the value of identification_number to a variable id. But identification_number is of the type double in action class.
So I want to know how to assign a numeric value to a variable on the JSP. I had gone through the documentation before posting the question.
The example that is present there is:
<s:set name="personName" value="person.name"/>
Hello, <s:property value="#personName"/>. How are you?
The name of the person is of type String so this will not create any problem. Is there any technique of using the <s:set> tag to assign numeric value to the variable? Or is it necessary that the value we are assigning should strictly be a String value?
Sorry. I read the documentation wrong
So the problem isn't the set tag itself (though it is changing the double to a String). Is the problem working with the double in the JSP or submitting the value back to the action?
Joined: May 02, 2012
The problem is with the set tag.
The value of identification_number is already set in the execute() method of the action class and it is of the type double.
Because the name identification_number is so long, I want to assign its value to a variable called "id" on the JSP and use it.
My query is: Is there any technique of using the <s:set> tag to assign numeric value to the variable "id"? Or is it necessary that the value we are assigning should strictly be a String value?