call.setOutput(new StringRepresentation(output));
call.setOutput(output, MediaType.TEXT_PLAIN);
   public static void main(String[] args)   {      try      {         // Create a new Restlet container      	Container myContainer = new Container();      	Context myContext = myContainer.getContext();         // Create the HTTP server connector, then add it to the container.          // Note that the container will act as the initial Restlet call's handler.         myContainer.getServers().add(Protocol.HTTP, 8182);         // Create a host router matching calls to the server         HostRouter host = new HostRouter(myContext, 8182);         myContainer.setRoot(host);         // Create a new Restlet that will display some path information.         Restlet myRestlet = new Restlet(myContext)            {               public void handleGet(Call call)               {                  // Print the requested URI path                  String output = "Resource URI:  " + call.getResourceRef() + '\n' +                                  "Base URI:      " + call.getBaseRef() + '\n' +                                  "Relative path: " + call.getRelativePart() + '\n' +                                  "Query string:  " + call.getResourceRef().getQuery();                  call.setOutput(new StringRepresentation(output));               }            };         // Then attach it to the host router.         host.getScorers().add("/trace", myRestlet);         // Now, let's start the container!         // Note that the HTTP server connector is also automatically started.         myContainer.start();      }      catch(Exception e)      {         e.printStackTrace();      }   }