搂主按照提示操作没有
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server
No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page language="java" contentType="text/html; charset=gb2312"%>
<%@ page info="a JSP example" %>
<html>
<head>
<title>第一个JSP</title>
</head>
<body>
<div align="center">
<table>
<tr>
<td>姓名</td>
<td>id</td>
</tr>
<%
int i;
String color1="99ccff";
String color2="88cc33";
for(i=1;i<=10;i++)
{
String color="";
if(i%2==0) color=color1;
else color=color2;
out.println("<tr bgcolor="+color+">");
out.println("<td>姓名"+i+"</td>");
out.println("<td>"+i+"</td>");
out.println("</tr>");
}
%>
</table>
</div>
</body>
</html>