This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am not sure what caused it to work as those lines are perfectly ok.
I think that your output was being cached by your browser (and that output was cached when you still had a mistake in your code). Sometimes hitting CNTRL-F5 will do the trick to make sure that you are looking at right output. It seems that changing the first line of your jsp made your browser to resubmit instead of getting your page from the cache.