By the time a JSP page gets to the browser, it's just an HTML page like any other. So you can get the markup of the non-working page (View Source from browser), and compare it to the markup of the working page to see what's different.
And again, you can;t make an Ajax request to a domain other then that which served the page. You'll need to use a server-side proxy, or JSONP if all you are making are GET requests.
The above behavior is with JSP implementation running on Tomcat (not the standalone html page). SO, I suspect is it really the cross domain issue as you pointed.