View Full Version : How to understand <% //<input

05-11-2007, 12:31 AM
I sam a line of code in a jsp page:

<% //<input type="text" name="test" value="abc" class="Input" size="28 maxlength="255" /> %>

How to interprete this line? Why put // (sounds like commentting out <input)
why put in <% %>



05-11-2007, 12:35 AM
Good question… maybe that is to show what belongs there eventually? Hard to say without knowing the context.

05-11-2007, 07:00 AM
That "test" name makes it seem as if a programmer was testing a function and then either thought better of it or decided to go back to it later. Either way, I'd just ignore it but if you're doing markup then be prepared to possibly style an input field.

I say this because I am working on that exact thing as I type this. :D