CORS For JAX-RS 2.0 / Java EE 7 Released : Adam Bien's Weblog

CORS For JAX-RS 2.0 / Java EE 7 Released : Adam Bien's Weblog Adam Bien's Weblog « Java 8: Streaming A... | Main | Java 8 + Nashorn... » CORS For JAX-RS 2.0 / Java EE 7 Released Cross-origin resource sharing support for Java EE 7 / JAX-RS 2.0 is released. The following dependency in a WAR will install and setup the CORS extension automatically: <dependency> <groupId>com.airhacks</groupId> <artifactId>jaxrs-cors</artifactId> <version>0.0.1</version> <scope>compile</scope> </dependency> CORS is opensource and Apache licensed: https://github.com/AdamBien/cors See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io ! Posted at 06:05AM Mar 25, 2014 by Adam Bien , Comments[4]  | Views/Hits: 136 NEW workshop: HTML 5 and JavaScript Essentials , Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming. Newsletter: airhacks.news A book about rethinking Java EE Patterns Comments: Does not work ! Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/AffableBean/rest/department/1. This can be fixed by moving the resource to the same domain or enabling CORS. Posted by kacha on May 10, 2014 at 03:56 PM CEST # It's crazy, with IE it works and with all other 4 Browsers (Firefox, Chrome, Opera, Safari) it fails. Posted by kacha on May 11, 2014 at 01:03 PM CEST # Not very useful, as there's no way to customize the CORS headers without hacking the library. I don't see the benefit of using this over creating your own Filter. Posted by DR on July 20, 2014 at 05:21 AM CEST # Great extension. Resolve CORS issue easily with it. Posted by David on August 31, 2016 at 03:46 AM CEST # Post a Comment: Name: E-Mail: URL: Notify me by email of new comments Remember Information? Your Comment: HTML Syntax: NOT allowed Number of posts: 1615 Number of comments: 5897 Yesterday's hits: 28599 Today's hits: 9770 Post reads / hour: 1434 Top posts: Adam Bien 158900 Java 8: Reading A File Into A String : Adam Bien's Weblog 68213 Java 7+: Writing A String To File--A One Liner : Adam Bien's Weblog 44212 Adam Bien's Weblog 41454 Simplest Possible EJB 3.1 / REST (JSR-311) Component : Adam Bien's Weblog 22184 Client-Side HTTP Basic Access Authentication With JAX-RS 2.0 : Adam Bien's [...] 19751 Don't use JPA's RESOURCE_LOCAL on the server : Adam Bien's Weblog 15415 Trending (last hour): Java 8 FlatMap Example : Adam Bien's Weblog 7 Java 8: From a for-loop to forEach statement : Adam Bien's Weblog 6 Setting Up Java EE 7 Projects With Maven 3 : Adam Bien's Weblog 5 Installing Oracle JDBC-Driver On Wildfly / JBoss : Adam Bien's Weblog 4 Java 8: Reading A File Into A String : Adam Bien's Weblog 4 about.adam-bien.com blog archives realworldpatterns.com Real World Java EE Patterns Rethinking Best Practices Order from amazon.de Order from amazon.com Online Workshops ...the last 150 posts 20+ Topics in 45 mins -- 35th airhacks.tv Questions and Answers JPA and Microservices, RxJava, CRUD and TX, Gradle, Cross Field Validation, Licensing, MDA or Topics For The 35th airhacks.tv JSON Is The New Data Transfer Object (DTO) Asynchronous WAR To WAR Communication With WebSockets Creating A CustomElement (WebComponent) From Scratch 60k eBills per Hour, Tiny WARs -- Or Java EE 7 In Mass Billing and Public Services Market in Slovenia Launching Java EE Thin WARs In The Clouds Upcoming Cloud, Microservice, Web and Java EE Events Importance of Java EE, JCP, Java EE Guardians and Microprofile--Interview With Reza Rahman Java 8 Base64 Encoding / Decoding Java 8 partitioningBy Example Java 8 groupingBy Example Java Is #1 In January 2017 Spring Boot vs. Wordpress, SOAP Rocks, CDI CMT, Reactive vs. Blocking IO, or 34th airhacks.tv is available 2017 Predictions Java EE vs. Spring, State of Microprofile, Is SOAP nice? Oracle targets non-payers or the topics for the 1.2017 / 34th airhacks.tv My Blog is a Personal Notepad Java 8: Converting An Array To A Stream Scalable, Productive, Decoupled, Resilient and Hacky New 2017! How To Maximize Fun In Enterprise Projects URL Templates With JAX-RS GlassFish on Steroids, Micro, Full, Clouds and Commercial Support--An Interview With Dominika Tasarz Load Balancing Microservices With Docker, nginx and TomEE Accidental Spring Evangelism, Rolling Updates, Log Management, Exception Factories, Docker, Queuing Choices or 33rd airhacks.tv Java EE 8 News, Central Logs, Layering, Util, ExceptionFactories, JDBC in Docker, DTOs, Lombok--Or 33rd airhacks.tv TomEE 7.0.2 Full--Docker Smoke Test Slicing The Monolith--With Java EE And Docker HTTP Status Code Test Service: statustest Custom Matchers, Better Messages: JAX-RS Client Rulz v0.0.4 released New Java EE Related Docker Images Arrived: Docklands Adding And Substracting Path Instances With Java How Many "Util"(-ities) Classes Ship Wit