JSP files, which reside and are interpreted on the server, have no relationship to one another as far as your client side (Javascript) code is concerned.
This article might help to clarify this for you.
http://www.javaranch.com/journal/200510/Journal200510.jsp#a1 If not, post back and let us know a little more about your JSP pages.
Is one included in the other? Are they in frames? How are loading both of them into the browser at the same time?
[ November 11, 2008: Message edited by: Ben Souther ]