本文出自:http://blog.csdn.net/svitter
实验环境:Myeclipse10 + tomcat7.0
有时间会写windows和linux下的tomcat配置,现在时间有限,暂且不写了。。有些东西也是没有理解透彻。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%!
String getDate()
{return new java.util.Date().toLocaleString();}
int count = 10;
%>
<html>
<head>
<title>一个典型的JSP</title>
</head>
<body>
<div align="center">
<table>
<tr bgcolor=777777>
<td>------------------------</td></tr>
<%
int i;
String color1="99ccff";
String color2="88cc33";
for(i = 1; i <= count; i++){
String color="";
if(i % 2 == 0)
color = color1;
else
color = color2;
out.println("<tr bgcolor="+color+"> <td> --- </td> </tr>");
}
%>
</table>
<hr><P>
当前时间是:
<%-- 下面是使用表达式的例子 --%>
<%=getDate() %></P></div>
</body>
</html>
Receiver type ‘X’ for instance message is a forward declaration,布布扣,bubuko.com
Receiver type ‘X’ for instance message is a forward declaration
原文:http://blog.csdn.net/sqc3375177/article/details/25657735