Look at the output (view source from your browser) and compare the two.
Is <!-- $Header: ....... $ --> being substituted with something else when your JSP runs?
As far as making sure your code works in all browsers.
Stick with the W3C specs and
test your code in all the browsers that you want to support as you write it.
This is an ongoing battle that all web developers have to deal with.
There is no one answer.
XHTML looks like it might bring us a lot closer.