应该可以
创建一个
URL url = new URL( protocol, host, port, context );
然后打开连接
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
发送你的请求
ObjectOutputStream oos = new ObjectOutputStream(httpURLConnection.getOutputStream() );
oos.writeObject( request );
oos.flush();
oos.close();
接收响应
ObjectInputStream ois = new ObjectInputStream(
                    httpURLConnection.getInputStream() );
httpResponse = ois.readObject();
ois.close();
连接servlet应该没有问题,连ASP没有试过,应该是一个道理,代码可以通用,HttpURLConnection的用法要参考一下doc。