myContainer.getDefaultHost().attach("/trace", myRestlet);
container.getDefaultHost().attach("/trace", handler);
   public static void main(String[] args) throws Exception   {      // Create a new Restlet container and add a HTTP server connector to it   	Container myContainer = new Container();      myContainer.getServers().add(Protocol.HTTP, 8182);      // Create a new Restlet that will display some path information.      Restlet myRestlet = new Restlet()         {            public void handleGet(Request request, Response response)            {               // Print the requested URI path               String output = "Resource URI:  " + request.getResourceRef() + '\n' +                               "Base URI:      " + request.getBaseRef() + '\n' +                               "Relative path: " + request.getRelativePart() + '\n' +                               "Query string:  " + request.getResourceRef().getQuery();               response.setEntity(output, MediaType.TEXT_PLAIN);            }         };      // Then attach it to the local host      myContainer.getDefaultHost().attach("/trace", myRestlet);      // Now, let's start the container!      // Note that the HTTP server connector is also automatically started.      myContainer.start();   }