File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Soft Skills this week in the Jobs Discussion 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