title: String to integer conversion in Java/JSP
body: <p>I have a variable <code>cost</code> defined in a DB2 table as <code>String</code>. I'm getting it into a value object where it is defined as a <code>String</code> as well. I need to check if the value coming in from DB2 is only spaces. If it is only spaces, I need to move 0 into it. I also need to remove leading zeros from it. I may get <code>cost</code> as <code>0000123</code>. But in JSP I need to display it as <code>123</code>. How do you do that? I'm storing the vo data into a session variable and using this, I'm displaying the data in JSP.</p>