aspose file tools*
The moose likes Struts and the fly likes Using Struts2 change negative number to positive number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using Struts2 change negative number to positive number " Watch "Using Struts2 change negative number to positive number " New topic
Author

Using Struts2 change negative number to positive number

Yogesh Misra
Greenhorn

Joined: Aug 24, 2009
Posts: 6
Hi , I am using this code to displaydata in jsp

<s:property value="bean.prevUnitTests.totalTests"/>

in this code i am getting totalTests value is -10 but i want to show only 10 (Positive value ) , so how we will do it ??
how can we change negative number to positive number

Please help me , Thanks

Yogesh M.
Yogesh Misra
Greenhorn

Joined: Aug 24, 2009
Posts: 6
Hi Friends ,

I got the solution so i am posting here , it will help to some other guys also


<s:property value="bean.prevUnitTests.totalTests * (-1)"/>

with this we can change negative value to positive


Regards,
Yogesh Mishra
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Struts2 change negative number to positive number
 
Similar Threads
right way to implement compareTo() method?
confusion in casting..
Double
Two's complement question
Test for negative long?