The main problem was that it was a pre flight request(OPTIONS request and after this was verified the POST request would follow).
I've solved the problem by adding the default CORS filter to my Tomcat(Tomcat install directory --> conf --> web.xml):
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
NOTE: The CORS filter is integrated in V 7.0.41(correct me if I'm wrong) and above.
The request can be done by using the XHR
request in Dojo.