日期:2014-05-18  浏览次数:20608 次

很高兴能来到这里和大家一起学习
以下是我写的一段JSP程序,实在Eclipse中实现的,但是不能读java代码
麻烦高手给指点一下
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<%@ page import="java.io.*" %> 
<%@ page import="java.sql.*" %> 

<html> 
<body>
<table border="1" bgcolor="#CCFF00">
<tr>
  <td>标题</td>
  <td>创建日期</td>
  <td> hbtyggh<% out.print("连接上了!"); %></td>
</tr>
</tabe>
<% out.print("连接上了!"); %>
<table width="95%" border="0">
  <% 
  out.print("连接上了!"); 
  Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); 
   
  String url ="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=WebClass"; 
  String username = "sa"; 
  String password = ""; 
  Connection con = DriverManager.getConnection(url, username, password); 
  Statement stmt = con.createStatement();
  ResultSet rs = stmt.executeQuery(Select * from news);
  while(rs.next()){
  %>
  <tr>
  <td><%=rs.getString("title")%></td>
  <td><%=rs.getString("createDate") %></td>
  </tr>
  <%
  }
  rs.close();
  con.close();
  %>
  </table>
  </body>
</html>

------解决方案--------------------
不能读java代码是什么意思?
说明白点