Excuse me if you've already considered this...
But I've got a strong feeling that the pages are saved in different encoding.
Note this is *not* just what's written in the page header, e.g. :
- <%@ page contentType="text/html;charset=UTF-8" ...
Rather, it's how the page is really saved on the file system.
Checking for file encoding on Windows: open the file with Notepad, press "Save As", and look at the 'save' dialog that pops up:
it should contain an 'encoding' field, which can be 'ANSI', "UTF-8", etc...
(You don't need to actually go through with 'saving', just see the current encoding, then cancel).
I think if you
test both your JSP files, Notepad would tell they have different encodings.
I get this feeling because with the 2nd JSP, the first 'out.write', looks like this:
- out.write("��< % @ p a g ...
And the little '��' scramble at the beginning of the file is usually a 'file encoding' indicator.
Please reply if that works
Good luck.