Say you're using
jsp:getProperty to auto-fill in form text inputs. What if you wanted to either change the label text's color or the background color of the input itself when you were returning the form to the user because of an error? I can think of ways to do this using scriptlets to check and see if the field we're about to add to the HTML was one of the incorrect ones and then change the CSS style accordingly, but it seems like those scriptlets could get messy. As an example, say I have this:
I suppose I could check before that HTML and see if the property was bad and, depending on that, output the appropriate class, but I'm wondering if anyone is using a more elegant solution...
Thanks for any tips!