How can I prevent the word "null" from appearing in my HTML input text fields when I populate them with a resultset that has null values?

Alex Chaffee

You could make a simple wrapper function, like

String blanknull(String s) {
  return (s == null) ? "" : s;

then use it inside your JSP form, like

<input type="text" name="shoesize" value="<%=blanknull(shoesize)%>">
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact