JAX-RS @Path URI matching example

In JAX-RS, you can use @Path to bind URI pattern to a Java method. See following examples to show you how it works. 1. Normal URI Matching See normal URI matching with @Path annotation. import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.core.Response; @Path("/users") public class UserRestService { @GET public Response getUser() { return Response.status(200).entity("getUser is called").build(); } …

Read more

jQuery – Access to restricted URI denied – Solution

Problem This jQuery error message is caused by loading the cross domain content. Error: [Exception… "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" It’s means you are loading some content that are not belong to or located at your site (different domain name). See this jQuery example to load the cross domain (yahoo.com) …

Read more