- [x] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/wiki/FAQ) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: latest

### Step to reproduce this issue

1. export a rest service DemoService with a url: rest://127.0.0.1:4444/test/
2. then we will get a real rest service with rest://127.0.0.1:4444/test/DemoService
3. but when we export a rest service DemoService with a url: rest://127.0.0.1:4444/test
4. then we will get a real rest service with rest://127.0.0.1:4444/DemoService

Those are the different results, in the second case the context path test is missing.
So users use explicit exporter and invoker to call rest services, they would feel puzzled.

We should fix it by modifying getContextPath method.

import org.apache.http.HttpResponse;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.config.SocketConfig;
import org.apache.http.conn.ConnectionKeepAliveStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicHeaderElementIterator;
import org.apache.http.protocol.HTTP;
import org.apache.http.protocol.HttpContext;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine;
import org.jboss.resteasy.util.GetRestful;
import javax.servlet.ServletContext;
import javax.ws.rs.ProcessingException;
import javax.ws.rs.WebApplicationException;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
public class RestProtocol extends AbstractProxyProtocol {
    private static final int DEFAULT_PORT = 80;
    private final Map<String, RestServer> servers = new ConcurrentHashMap<String, RestServer>();
    private final RestServerFactory serverFactory = new RestServerFactory();
    
    private final List<ResteasyClient> clients = Collections.synchronizedList(new LinkedList<ResteasyClient>());