this is t full source code:
<style type="text/css">
<!--
body,td,th {
color: #000000;
}
.style5 {color: #0000FF}
.style18 {font-size: 16px}
.style19 {font-size: 36px}
body {
background-color: #FFFFFF;
}
-->
</style>
</head>
<body>
<hr>
<form name="form1" method="post" action="">
<table width="744" border="1" align="center">
<tr>
<td width="734"><p>
<%
request.setCharacterEncoding("big5");
Connection con ;
PreparedStatement stmt = null;
ResultSet rs = null;
%>
</p>
<table width="475" border="1" align="center">
<tr>
<td width="51" bgcolor="#99FF00"> </td>
<td width="64" bgcolor="#99FF00">link</td>
</tr>
<%
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/webapp?user=root&useUnicode=true&characterEncoding=big5");
stmt=con.prepareStatement("select id, link from link");
rs = stmt.executeQuery();
while(rs.next()) {
out.print("<tr><td>");
out.print(rs.getString("id"));
out.print("</td><td>");
// out.print(rs.getString("link"));
// out.print("<a href = rs.getString("link")> rs.getString("link") </a>");
//String s=rs.getString("link");
out.println( "<a href =" + rs.getString("link") +"> " + rs.getString("link") + "</a>");
out.print("</td></tr>");
}
%>
</table>
<p>
<%
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if (stmt!=null) stmt.close();
if (rs!=null) rs.close();
}
%>
</p>
<p> </p></td>
</tr>
</table>
<p>
<% /*
String name=((String)session.getAttribute("uid")==null)?"":(String)session.getAttribute("uid");
if(name.equals("")){
{response.sendRedirect("admin.jsp");}
} */
%>
</p>
</form>
</div>
</body>
</html>
================output============================
link
1 www.hotmail.com
2 www.google.com
3 www.yahoo.com
i wish click on the hyperlink it is link to the page.