I want the REST server to be accessible to web/ browser app. Which is
correct example to refer to.

On Wed, Dec 2, 2015 at 11:15 AM, Shashank Dutt Jha <[email protected]>
wrote:

> Server side code:
>
>    protected Server() throws Exception {
>         JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
>         sf.setResourceClasses(CustomerService.class);
>         sf.setResourceProvider(CustomerService.class,
>             new SingletonResourceProvider(new CustomerService()));
>         sf.setAddress("http://161.85.91.7:9000/";);
>         sf.create();
>
>
> -------
> When I try to connect to server from chrome browser I get following error
>
> MLHttpRequest cannot load http://161.85.91.7:9001/office/offices/123.
> Response to preflight request doesn't pass access control check: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
> Origin 'http://localhost:56696' is therefore not allowed access.
>
>
> How to resolve this issue?
>
>
>

Reply via email to