I have 2 different java web projects running on 2 different tomcat server. Lets say projA and projB Here I am trying to load html available in projB from projA. I am simply using jQuery.load() to achieve this.But it is giving me No 'Access-Control-Allow-Origin' header is present on the requested resource error. I also tried to use jquery cross domain plugin availabele here https://github.com/padolsey-archive/jquery.fn/tree/master/cross-domain-ajax
But this does not work out. Any help will be appreciated.
code i am trying
$191('.ontop').load("http://"+host+":8080/OtherDomain/",function(response,status)
{
if (status == "error")
{
$191('.ontop').empty();
var msg = "Sorry We could not connect to our server.. Please try again later.";
alert(msg);
}
else
{
alert(status);
$191('.ontop').css('display', 'block');
}
});