<%@ page language="java" import="java.util.*,java.io.*,java.net.*,java.util.regex.*" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'href.jsp' starting page</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->  </head>
  
  <body>
    <%
    
     Pattern p = null; //正则表达式
Matcher m = null; //操作的字符串
boolean b = false;
    
     String sCurrentLine = "";
     String sTotalString = "";
    
     InputStream l_urlStream;
     java.net.URL l_url = new java.net.URL("http://www.chinaventure.com.cn/");
     HttpURLConnection l_connection =(HttpURLConnection)l_url.openConnection();
    
     l_connection.connect();
     l_urlStream = l_connection.getInputStream();
    
     BufferedReader l_reader = new BufferedReader(new InputStreamReader(l_urlStream));
    
    
     if(l_reader.readLine()== null){
     System.out.println(l_reader.ready());
     }
    
     System.out.println(l_reader.readLine());
     System.out.println(sCurrentLine);
       while ((sCurrentLine = l_reader.readLine()) != null){
      //sCurrentLine="65465.56";
     p = Pattern.compile("[0-9]+.[0-9]+");
     //sCurrentLine="<a face='Arial' size='+2' color='red'>";
     //p = Pattern.compile("");
     m = p.matcher(sCurrentLine);
     b = m.matches();
     System.out.println(sCurrentLine);
     System.out.println(b);    
     if(b){
     //String url = sCurrentLine.substring(sCurrentLine.indexOf("<a href"),sCurrentLine.indexOf(">"));
     sTotalString += sCurrentLine;
     //System.out.println(url);
     }
     }
    
     System.out.println(sTotalString);
    %>
  </body>
</html>------------------------------------------------------------------------------------------------
就一个jsp页面   
while条件里判断的是当前读取的行
可是遇到null值就不读取下一行了
java.net.URL l_url = new java.net.URL("http://www.chinaventure.com.cn/");
把这里面的网址换一个就基本没有问题了
可是又必须要这个页面才可以  而且这个页面的html代码的第一行没东西
怎么办啊,  
我可不可以在readline()为空值的时候让readline()为""字符串啊,或者是给当前行重新赋值...