This demoe is for passing the message beween to different domains
Here is the steps
-
create two different workspace in Eclipse , and add the the tomcat server
-
create dynamic web probject in two workspace
-
copy the index.html to one project . Child.html to another project
-
adjust the tomcat server port to 7080 in the Eclipse workpace which include project that inclucde the indix.html
-
adjust the tomcat server port to 9080 in the Eclipse workpace which include project that inclucde the Child.html
-
add below host infomaiton to the host file , and the locaiton is C:\Windows\System32\drivers\etc
127.0.0.1 localhost 127.0.0.1 ChildHost
-
Run the applicaotns in tomcat server
-
run the index.html , then you can communicate the message beow two different domains