set tag not working for numeric data types
0 posts in topic
Thread View Thread View

set tag not working for numeric data types...
Fri Dec 13, 2013 02:45 AM


I am using Struts 2.3.x. I have an action class in which there is a private variable "identification_number" of type double with its public setter and getter methods. The getter method returns double. 

In the execute() method, I set the value of this variable to 2155. 

On my  JSP , I want to repeatedly use this variable so I prefer a shorter name "id". 

So when I tried to use <s:set var="id" value="identification_number" /> I got the following exception: 

Struts Problem Report 
Struts has detected an unhandled exception: 

Messages:  java.lang.Double  cannot be cast to  java.lang.String  

My question is how to use the set tag for numeric data types? 


About | Sitemap | Contact