<%@ 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=" a" height="Bayi" 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=" the" valign="Top"><Div Align="left"><span class="Style8"><%=Rs1.getstring ("Name")%></span><BR>
<%--<span class= "Style4" ><%=substring (rs1.getstring ("message"), "%&G" T;</span>--%>
</ Div ></ TD >
< td width = "9" Span style= "COLOR: #932192" >valign = <!--dwlayoutemptycell--> </ TD >
</ TR >
<%
} rs1.close ();
%>
How to display a form on a JSP