我这么写了一个简单的测试,还是报500的错误,但是其他的网站可以,比如百度,错误如下 
java.io.IOException: Server returned HTTP response code: 500 for URL: http://www.dianping.com/beijing 
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 
at Testdianping.main(Testdianping.java:9) 
不知道到底该怎么改啊 
Java代码 
import java.io.*;  
import java.net.*;  
public class Testdianping {  
    public static void main(String[] args)  
    {  
        try {  
            URL url = new URL("http://www.dianping.com/beijing");  
            HttpURLConnection uc = (HttpURLConnection) url.openConnection();  
            BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream(),"utf-8"));  
            String str;  
            while((str = br.readLine()) != null)  
            {  
                System.out.println(str);  
            }  
        } catch (MalformedURLException e) {  
            // TODO Auto-generated catch block  
            e.printStackTrace();  
        } catch (IOException e) {  
            // TODO Auto-generated catch block  
            e.printStackTrace();  
        }  
    }  
}  import java.io.*; 
import java.net.*; 
public class Testdianping { 
public static void main(String[] args) 

try { 
URL url = new URL("http://www.dianping.com/beijing"); 
HttpURLConnection uc = (HttpURLConnection) url.openConnection(); 
BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream(),"utf-8")); 
String str; 
while((str = br.readLine()) != null) 

System.out.println(str); 

} catch (MalformedURLException e) { 
// TODO Auto-generated catch block 
e.printStackTrace(); 
} catch (IOException e) { 
// TODO Auto-generated catch block 
e.printStackTrace(); 


}