I have this JSP where I have alot of fields with conditions. I would like to make it more efficient and use a for loop. Here is an example (showing 2 fields for example only):
It prints out Joe Miller
Now my attempt below to put this in a loop prints out null null:
You're using the same string for the key and the value and neither of them is 'firstname' or 'lastname'.
In any event, this is not really a JSP specific issue. This Java code in this scriptlet could be run from any Java program. Moving to Java In General (Beginner)