I feel like this should be fairly simple... I apologize if this is a stupid question but I'm fairly new to jsp and struts. I am retrieving a property that for storage purposes needs to be in Kb, however I would like to display in in Mb, necessitating dividing by 1000.
As you can see, the value is getting written in to a table. How can i take this bean and simply divide the value by 1000?
Though I don't feel good sharing scriptlet code which is not advised,....here it goes (I hope someone else could help in this)
I didn't try it personally, try something like below. This should serve the purpose for now
Joined: Jul 27, 2011
I know scriptlets are generally a bad habit to get into, b/c you don't want to implement business logic in presentation components, but this is perfect for this one need. Thank you, works perfectly.
Just the simple conversion didn't seem worth adding another property, since is the only place it will be used in MB (more user-friendly for viewing purposes). However for storage purposes it is better to be in kB for better granularity