1. 程式人生 > 其它 >Pandas 筆記(四)

Pandas 筆記(四)

  1. 環境搭建,執行出來一個JSP頁面,顯式hello
  1. 英文字母表
 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6 
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> 8 <html> 9 <head> 10 <base href="<%=basePath%>"> 11 12 <title>My JSP 'index.jsp' starting page</title> 13 <meta http-equiv="pragma" content="no-cache"> 14 <meta http-equiv="cache-control" content="no-cache"> 15 <meta
http-equiv="expires" content="0"> 16 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> 17 <meta http-equiv="description" content="This is my page"> 18 <!-- 19 <link rel="stylesheet" type="text/css" href="styles.css"> 20 --> 21 </head
> 22 23 <body> 24 <h3>乘法表</h3> 25 <p style ="font-family:宋體;font-size:15;colcr:bule"> 26 <% 27 for(int j=1;j<=9;j++){ 28 for(int i=1;i<=j;i++){ 29 int n=i*j; 30 out.print (i+"x"+j+"="+n+" "); 31 } 32 out.print("<br>"); 33 } 34 %> 35 </p> 36 </body> 37 </html>
  1. 99乘法表
 1 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6 
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9   <head>
10     <base href="<%=basePath%>">
11     
12     <title>My JSP 'index.jsp' starting page</title>
13     <meta http-equiv="pragma" content="no-cache">
14     <meta http-equiv="cache-control" content="no-cache">
15     <meta http-equiv="expires" content="0">    
16     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
17     <meta http-equiv="description" content="This is my page">
18     <!--
19     <link rel="stylesheet" type="text/css" href="styles.css">
20     -->
21   </head>
22   
23   <body>
24     <p style = "font-family:黑體;gont-size:36">
25     <br>英文字母表:</br>
26     </p>
27     <p style ="font-family:宋體;font-size:25;colcr:bule">
28     <% char upperCase;
29       char lowerCase;
30       for(upperCase = 'A';upperCase <='Z';upperCase++){
31       lowerCase=(char)(upperCase+32);
32       out.print(upperCase +"("+lowerCase + ")"+ " ");
33       if(upperCase == 'M')
34       out.print("<br>");
35       } 
36       %>
37     </p>
38   </body>
39 </html>