当前位置: 代码迷 >> Java Web开发 >> jsp小偷程序报错解决办法
  详细解决方案

jsp小偷程序报错解决办法

热度:156   发布时间:2016-04-17 13:34:57.0
jsp小偷程序报错
code
<%@   page   contentType= "text/html;charset=gb2312 "%>
<%String   sCurrentLine;
String   sTotalString;
sCurrentLine= " ";
sTotalString= " ";
java.io.InputStream   l_urlStream;
java.net.URL   l_url   =   new   java.net.URL( "http://www.w3sky.com/ ");
java.net.HttpURLConnection   l_connection   =   (java.net.HttpURLConnection)
l_url.openConnection();
l_connection.connect();
l_urlStream   =   l_connection.getInputStream();
java.io.BufferedReader   l_reader   =   new   java.io.BufferedReader(new   java.io.InputStreamReader(l_urlStream));
while   ((sCurrentLine   =   l_reader.readLine())   !=   null){  
sTotalString+=sCurrentLine;         }
out.println(sTotalString);         %>

exception
java.net.UnknownHostException:   www.w3sky.com

------解决方案--------------------
up
  相关解决方案