首页 > 代码库 > 怎么再jsp上显示一个表单
怎么再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();
%>
怎么再jsp上显示一个表单