jsp - including external URL javascript file -
i have main header page included in many different applications across couple of different languages, including java , classic asp. file (file.js) going obsolete soon. going going "out-of-the-box" solution, new header created group. gave link ("google.com") need use show new header. wondering if there simple solution implement in file.js show content users. know easy way in jsp is
<c:import url="http://google.com"/>
but won't work in js file, nor work in jsp. there way me this?
thank you, explosive_donut
obviously url given isn't google. suppose second team able modify own (document) headers sent clients.
first way think of use ajax retrieve contents of url , create div or select existing set new content.
unfortunately ajax restricted same origin policy can circumvented cors (cross origin resource sharing). allow cors, remote server client maschines need send respective headers. check out link more information.
if need more information and/or tutorials, let me know in comments.
Comments
Post a Comment