怎么再jsp上显示一个表单
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%
request.setCharacterEncoding("gb2312");
java.sql.Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/GPSDatabase","root","123456");
String sql1="SELECT top 2 * from jdjq order by id desc";
Statement statemenet = (Statement) conn.createStatement();
ResultSet rs1 = statemenet.executeQuery(sql1);
while(rs1.next()){
%>
<tr>
<td width="12" height="81" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="158" valign="top" bgcolor="#999999" class="dh"><div align="center"><img src="file/<%=rs1.getString("image")%>" width="154" height="77"></div></td>
<td width="240" valign="top"><div align="left"><span class="style8"><%=rs1.getString("name")%></span><br>
<%-- <span class="style4"><%=substring(rs1.getString("message"),120)%></span> --%>
</div></td>
<td width="9" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<%
} rs1.close();
%>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。