<commit_before>h2. Welcome to the home of JCors

JCors is a simple and flexible Java implementation of W3C CORS spec.
See more details about CORS "here":http://www.w3.org/TR/cors/

h3. CORS?

CORS stands for Cross-Origin Resource Sharing and it's a new way to enable client-side cross-origin requests.
Before CORS it was (almost) impossible to make Ajax requests to another domain because of 'Same Origin Policy' enforced by Javascript.
Some newest browsers already implement CORS support in order to make cross-domain client-side requests possible without the need of using hacks (such JSON-P).

h3. And what exactly is JCors?

JCors is a small lib that provides a simple Servlet Filter that enables CORS request handling by existing Java resources. 
These resources can be anything like webservices (REST / SOAP), Servlets, Struts Actions...

h3. Using JCors

Just add this to your __web.xml__ file:

@<filter>@
   @<filter-name>CorsFilter</filter-name>@
   @<filter-class>org.jcors.web.CorsEnablingFilter</filter-class>@
@</filter>@
	
@<filter-mapping>@
   @<filter-name>CorsFilter</filter-name>@
   @<url-pattern>/resource/*</url-pattern>@
@</filter-mapping>@

And optionally, add a file __jcors.xml__ to your classpath
Check the __jcors-sample.xml__ "here":https://github.com/diegossilveira/jcors/blob/master/src/main/resources/jcors-sample.xml

h3. And Maven?

Now you can get JCors from Maven Central Repository:

@<dependency>@
   @<groupId>org.jcors</groupId>@
   @<artifactId>jcors </artifactId>@
   @<version>1.1</version>@
@</dependency>@

h3. Help Me!

There are some things to improve on this project, can you help me?

 * Improve JUnit tests
 * Servlet 3.0 API support
 * Request Headers validation

h3. About me

Email me: diegossilveira at gmail.<EMAIL>

Follow me: "@diegossilveira":http://twitter.com/diegossilveira<commit_msg>Formatting README file<commit_after>h2. Welcome to the home of JCors

JCors is a simple and flexible Java implementation of W3C CORS spec.
See more details about CORS "here":http://www.w3.org/TR/cors/

h3. CORS?

CORS stands for Cross-Origin Resource Sharing and it's a new way to enable client-side cross-origin requests.
Before CORS it was (almost) impossible to make Ajax requests to another domain because of 'Same Origin Policy' enforced by Javascript.
Some newest browsers already implement CORS support in order to make cross-domain client-side requests possible without the need of using hacks (such JSON-P).

h3. And what exactly is JCors?

JCors is a small lib that provides a simple Servlet Filter that enables CORS request handling by existing Java resources. 
These resources can be anything like webservices (REST / SOAP), Servlets, Struts Actions...

h3. Using JCors

Just add this to your __web.xml__ file:

bc.. <filter>
   <filter-name>CorsFilter</filter-name>
   <filter-class>org.jcors.web.CorsEnablingFilter</filter-class>
</filter>
	
<filter-mapping>
   <filter-name>CorsFilter</filter-name>
   <url-pattern>/resource/*</url-pattern>
</filter-mapping>

p. And optionally, add a file __jcors.xml__ to your classpath
Check the __jcors-sample.xml__ "here":https://github.com/diegossilveira/jcors/blob/master/src/main/resources/jcors-sample.xml

h3. And Maven?

Now you can get JCors from Maven Central Repository:

bc.. <dependency>
   <groupId>org.jcors</groupId>
   <artifactId>jcors</artifactId>
   <version>1.1</version>
</dependency>

h3. Help Me!

There are some things to improve on this project, can you help me?

 * Improve unit tests
 * Servlet 3.0 API support
 * Request Headers validation

h3. About me

Email me: diegossilveira at gmail.com

Follow me: "@diegossilveira":http://twitter.com/diegossilveira
{'fraction_non_alphanumeric': 0.0964149918522542, 'fraction_numerical': 0.007061379684953829, 'mean_word_length': 4.368804664723032, 'pattern_counts': {'":': 6, '<': 44, '<?xml version=': 0, '>': 44, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2678697', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1157, 'n_words': 425}