2.7.0版本getContextPath方法：
```
protected String getContextPath(URL url) {
        String contextPath = url.getPath();
        return contextPath.endsWith("/") ? contextPath.substring(0,contextPath.length()-1) : contextPath;
    }
```
无法将方法置入web容器中，退回2.6.5版本的方法：
```
protected String getContextPath(URL url) {
        int pos = url.getPath().lastIndexOf("/");
        return pos > 0 ? url.getPath().substring(0, pos) : "";
    }
```
使用正常，两个方法应该不等价的。
private static final int HTTPCLIENTCONNECTIONMANAGER_MAXTOTAL = 20;
    private static final int HTTPCLIENT_KEEPALIVEDURATION = 30 * 1000;
    private static final int HTTPCLIENTCONNECTIONMANAGER_CLOSEWAITTIME_MS = 1000;
    private static final int HTTPCLIENTCONNECTIONMANAGER_CLOSEIDLETIME_S = 30;
    private final Map<String, RestServer> servers = new ConcurrentHashMap<>();
    private final RestServerFactory serverFactory = new RestServerFactory();
    
    private final List<ResteasyClient> clients = Collections.synchronizedList(new LinkedList<>());
    private volatile ConnectionMonitor connectionMonitor;
    public RestProtocol() {
        super(WebApplicationException.class, ProcessingException.class);
    }
    public void setHttpBinder(HttpBinder httpBinder) {
        serverFactory.setHttpBinder(httpBinder);
    }
    @Override
    public int getDefaultPort() {
        return DEFAULT_PORT;
    }
    @Override
    protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcException {
        String addr = getAddr(url);
        Class implClass = ApplicationModel.getProviderModel(url.getServiceKey()).getServiceInstance().getClass();
        RestServer server = servers.computeIfAbsent(addr, restServer -> {
            RestServer s = serverFactory.createServer(url.getParameter(Constants.SERVER_KEY, DEFAULT_SERVER));
            s.start(url);
            return s;
        });
        String contextPath = getContextPath(url);
        if ("servlet".equalsIgnoreCase(url.getParameter(Constants.SERVER_KEY, DEFAULT_SERVER))) {