Long time no post!
As i have already told, our Dynamic CRM Customizations deals with ABAS ERP software.
To respond some requirements of Service Processing subsystem, in a CASE form we want a button that by clicking on, product information get loaded to the form. User inputs a serial number, and by that SN, a request made to ERP server and products information get back as response.
I am new to Java developed web services and also to apache tomcat web. If it was a .net web service, I could solve problem by adding required headers. But the web service is a Java project and developed using Eclipse IDE. After a lots of research I found that I cand add CORS (Cross Origin resource sharing) to tomcat, but for versions higher than 7.0.41 !
I installed latest version and read lots of documents and questions around web. In official docs of tomcat, it says by adding some xml tags you can enable CORS for entire apps hosted in tomcat. As it seems it is not actually that easy.
What I had to do? I had to download two libraries mentioned in this guideline and them to lib folder of tomcat. It is the best solution, but in addition to add those libraries to the lib folder of tomcat, you also have to add them to lib folder of the application you want to have CORS enabled.