Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Making Glassfish respond to OPTIONS HTTP-method call  RSS feed

Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to develop an HTML-page with Javascript/JQuery code that interacts with a SOAP web service running on Glassfish.

I'm trying to do the web service call as a POST HTTP-method request using AJAX. The problem is that the web service is running on a different server than where the page is served from, which, because of the cross-domain policy, results in my browser (Firefox) first doing an OPTIONS HTTP request to determine if the web service will allow the POST request. The web service running on Glassfish won't respond to this OPTIONS request.

I've seen that this can be configured in other application servers, by setting Access-Control-Allow-Origin to a pattern that recognizes all origins that should be accepted (for instance '*' to accept any request).
How do I make Glassfish respond to the OPTIONS request?
Wanna see my flashlight? How about this tiny ad?
Why should you try IntelliJ IDEA ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!