File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes displaying zeros in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "displaying zeros in jsp" Watch "displaying zeros in jsp" New topic
Author

displaying zeros in jsp

Anant Rao
Ranch Hand

Joined: Nov 12, 2004
Posts: 126
HI
I have nullable numberic fields in the database when those fields are empty when I display in jsp, its showing zero instead of empty.

How can I avoid them. I have declared those variables as int or BigDecimal in my action form and entity.

one more thing when i have null in database i try to display in jsp its giveing a conversion error.

Regards
Infyniti.
[ January 11, 2006: Message edited by: infyniti molugu ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

"infyniti",

You've been around the Ranch long enough to know about the display name rules. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60991
    
  65

And do you really think "Hi" is a good title for this topic? If so, please read this.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
This topic should also be sitting in the jsp forum since it has nothing to do with the clientside.

Moving there now....

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: displaying zeros in jsp