out.print("" ++"" + rs3.getInt(1)+"" + rs3.getString(2)+& #34;&#34 + rs3.getString(3)+"&#34 + rs3.getString(4)+"&#34 + rs3.getString(5)+&#34 ;" + rs3.getString(6)+"" + rs3.getString(7)+"" + rs3.getString(8)+"& #34);
答案 0 :(得分:-1)
我假设您正在尝试在servlet中实现类似的功能......
<html>
<body>
<table border='1'>
<tr>
<td> <a href="link/to/another/page" >LinkToAnotherPage</a> </td>
<td> <a href="link/to/another/page" >LinkToAnotherPage</a> </td>
<td> <a href="link/to/another/page" >LinkToAnotherPage</a> </td>
</tr>
</table>
</body>
</html>
然后,在servlet中,它的等价将是......
String myPath="link/to/another/page";
out.print("<table border='1'> <br>" );
out.print("<tr> <br>");
out.print("<td> <a href='"+myPath+"'>LinkToAnotherPage </a> </td>");
out.print("<td> <a href='"+myPath+"'>LinkToAnotherPage </a> </td>");
out.print("</tr> </table> </body> </html>");
在href=
之后注意&#39; 和&#34; 。