This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
One way to do this would be to add a getFormattedHospitalId() and setFormattedHospitalId() method to your hospitaldata class. Have the getter method return a string which represents the the double value formatted using java.text.NumberFormat, and have the setter method convert the string to a double. You would then use the property formattedHospitalId in your jsp rather than hospitalId.