if you are getting this types of exception and you are using Apache tomcat 7.42 or latest version then you
need to modify the web.xml file which is store in side the apache-tomcat-7.0.52\conf\web.xml
This error will comes when you are try to access resources from the other server for e.g
you are loading templates from the tomcat 6 and you are sending the request to Apache tomcat 7 for getting data then this types of error will comes..for the security reason the Apache tomcat want be allow to load templates from one server and get the data from other server. so for solution of this, you have to include the filter in Apache tomcat 7 like bellow.
you need to paste this bellow contain.
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
then it will work. for more information you can visit this link