1 /* 2 * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. 3 */ 4 package com.tc.server; 5 6 7 public class AdminHandler { // extends AbstractHttpHandler { 8 9 // public synchronized void handle(String pathInContext, String pathParams, HttpRequest request, HttpResponse 10 // response) 11 // throws HttpException, IOException { 12 // if (pathInContext.startsWith("/lib/") || pathInContext.startsWith("/docs/")) { 13 // // leave these requests intact 14 // } else if (pathInContext.endsWith(".jar")) { 15 // // This is a bit of a hack. The JNLP for the Admin client will request jars relative to the location of the 16 // location of the .jnlp file 17 // String[] parts = pathInContext.split("/"); 18 // String newPath = "/lib/" + parts[parts.length - 1]; 19 // int prev = request.setState(HttpMessage.__MSG_EDITABLE); 20 // request.setPath(newPath); 21 // request.setState(prev); 22 // getHttpContext().getHttpServer().service(request, response); 23 // } else if (!pathInContext.startsWith("/admin/")) { 24 // response.sendRedirect("/admin" + request.getPath()); 25 // } 26 // } 27 } 28