Router user = new Router(getContext()); router.attach("/users/[a-z]+", user);
			public Restlet createRoot()			{				// Create a root Router				Router router = new Router(getContext());				// Attach a Guard to secure access to the chained directory handler				Guard guard = new Guard(getContext(), ChallengeScheme.HTTP_BASIC,						"Restlet tutorial");				guard.getAuthorizations().put("scott", "tiger");				router.getScorers().add("/docs/", guard);				// Create a Directory able to return a deep hierarchy of Web files				Directory directory = new Directory(getContext(), ROOT_URI);				guard.setNext(directory);				// Create the user Router				Router user = new Router(getContext());				router.attach("/users/[a-z]+", user);				// Create the account Handler				Handler account = new Handler()				{					@Override					public void handleGet(Request request, Response response)					{						// Print the requested URI path						String message = "Account of user named: "								+ request.getBaseRef().getLastSegment();						response.setEntity(message, MediaType.TEXT_PLAIN);					}				};				user.attach("$", account);				// Create the orders Handler				Handler orders = new Handler(getContext())				{					@Override					public void handleGet(Request request, Response response)					{						// Print the user name of the requested orders						List<String> segments = request.getBaseRef().getSegments();						String message = "Orders of user named: "								+ segments.get(segments.size() - 2);						response.setEntity(message, MediaType.TEXT_PLAIN);					}				};				user.attach("/orders$", orders);				// Return the root router				return router;			}