本文出自:http://blog.csdn.net/svitter
實(shí)驗(yàn)環(huán)境:Myeclipse10 + tomcat7.0
有時(shí)間會(huì)寫(xiě)windows和linux下的tomcat配置,現(xiàn)在時(shí)間有限,暫且不寫(xiě)了,
JSPa sample jsp
。。有些東西也是沒(méi)有理解透徹。?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%!
String getDate()
{return new java.util.Date().toLocaleString();}
int count = 10;
%>
<%
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("");
}
%>
------------------------ ---
當(dāng)前時(shí)間是:
<%-- 下面是使用表達(dá)式的例子 --%>
<%=getDate() %>
運(yùn)行結(jié)果: