Hi Michael, Your JSP code may have only one line of code after the 'if'. But when it gets translated into a servlet, the single line of jsp code may represented by more lines. In your case, the translated code may look like: if (str.equals("")) jspWriter.print("\n"); //<BR> jspWriter.print("str is empty"); //str is empty else jspWriter.print("\n"); //<BR> jspWriter.print("str ="); //str = jspWriter.print(str); //<%= str %> Thanks, Venkatesh. SCJP 1.4
Joined: Jan 30, 2002
Thanks Venkatesh, That makes sense. You know I always bracket my ifs anyway in pure Java code, I was just being lazy this time and it bit me.