.addExtension("gif", MediaTypes.IMAGE_GIF) .up(2).toMaplet()
.addExtension("gif", MediaTypes.IMAGE_GIF).upMaplet()
   public static void main(String[] args)   {      try      {         // Create the user Restlet         Restlet userRestlet = new AbstractRestlet()            {         		public void handleGet(Call call)               {                  // Print the requested URI path                  String output = "Account of user named: " + call.getContextRef().getLastSegment();                  call.setOutput(new StringRepresentation(output, MediaTypes.TEXT_PLAIN));               }            };         // Create the orders Restlet         Restlet ordersRestlet = new AbstractRestlet()         	{            	public void handleGet(Call call)               {            		// Print the user name of the requested orders                  List<String> segments = call.getContextRef().getSegments();                  String output = "Orders of user named: " + segments.get(segments.size() - 2);                  call.setOutput(new StringRepresentation(output, MediaTypes.TEXT_PLAIN));               }            };      	         // Build and start the container      	new RestletContainerBuilder("My container")      		.addServer(Protocols.HTTP, "My server", 8182)      		.attachLog("com.noelios.restlet.example")      			.attachStatus(true, "webmaster@mysite.org", "http://www.mysite.org")      				.attachHost(8182)      					.attachGuard("/docs/", "com.noelios.restlet.example", true, ChallengeSchemes.HTTP_BASIC , "Restlet tutorial", true)      						.authorize("scott", "tiger")      						.attachDirectory("D:/Restlet/www/docs/api/", true, "index")      							.addExtension("html", MediaTypes.TEXT_HTML)      							.addExtension("css", MediaTypes.TEXT_CSS)      							.addExtension("gif", MediaTypes.IMAGE_GIF)      							.up(2).toMaplet()   						.attachMaplet("/users")   							.attachMaplet("/[a-z]+")   								.attach("$", userRestlet)   									.up().toMaplet()									.attach("/orders$", ordersRestlet)										.owner().start();      }      catch(Exception e)      {         e.printStackTrace();      }   }