Hi, I am trying to use the formatNumber function to display a string value returned from a database via rs.getString(). I have been testing the formatNumber function and see how it works but I cannot figure out how to pass the string returned from the database into the value parameter of the formatNumber fucntion. Is there any way I can do this?
Mixing scriptlets and JSTL/EL in a JSP page is recipe for complete and utter disaster.
You should do two things in order of importance:
Never ever, and did I mention ever, send a resultset to a JSP. Rather, copy the data from the resultset into a Java collection immediately after fetching it and release the resultset. This collection (List, array, whatever) is what gets sent to the JSP.
Use no scriptlets or other Java code in a JSP. That's a practice that has been discredited for almot 10 years now.