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