try
{
stmt = conn.createStatement();
sql="SELECT id,title,author,content FROM note";
rs=stmt.executeQuery(sql);
%>
<table border="1" width="80%">
<tr>
<td>id</td>
<td>title</td>
<td>author</td>
<td>content</td>
</tr>
<%
while(rs.next())
{
//i++;
int id=rs.getInt("id");
String title=rs.getString("title");
String author=rs.getString("author");
String content=rs.getString("content");
%>
<tr>
<td><%=id %></td>
<td><%=title %></td>
<td><%=author %></td>
<td><%=content %></td>
</tr>
<%
}
//if(i==0)
//{
%>
</table>
</center>
<%
}
catch(Exception e)
{
%>
<h2>dgsdg</h2>
<%
}
运行时出现异常,打印出dgsdg,请高手帮忙指点一下。
{
stmt = conn.createStatement();
sql="SELECT id,title,author,content FROM note";
rs=stmt.executeQuery(sql);
%>
<table border="1" width="80%">
<tr>
<td>id</td>
<td>title</td>
<td>author</td>
<td>content</td>
</tr>
<%
while(rs.next())
{
//i++;
int id=rs.getInt("id");
String title=rs.getString("title");
String author=rs.getString("author");
String content=rs.getString("content");
%>
<tr>
<td><%=id %></td>
<td><%=title %></td>
<td><%=author %></td>
<td><%=content %></td>
</tr>
<%
}
//if(i==0)
//{
%>
</table>
</center>
<%
}
catch(Exception e)
{
%>
<h2>dgsdg</h2>
<%
}
运行时出现异常,打印出dgsdg,请高手帮忙指点一下。
}
catch(Exception e)
{
%>
<h2> <%=e.printStack()%> </h2>
<%
}
把详细错误打出来看看吧
这个错误什么意思啊。