JavaDailyReports10_17

学习JavaWeb第一天

输出我的第一个HelloWorld!

 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     <meta charset ="UTF-8">
12     
13     <title>我的第一个网页</title>
14     <meta http-equiv="pragma" content="no-cache">
15     <meta http-equiv="cache-control" content="no-cache">
16     <meta http-equiv="expires" content="0">    
17     <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
18     <meta http-equiv="description" content="This is my page">
19     <!--
20     <link rel="stylesheet" type="text/css" href="styles.css">
21     -->
22   </head>
23   
24   <body>
25     HelloWorld!<br>
26   </body>
27 </html>

 

 
<body>
    HelloWorld!<br>
    <h1>Hello World 1</h1>
    <h2>Hello World 2</h2>
    <h3>Hello World 3</h3>
    <h4>Hello World 4</h4>
    <h5>Hello World 5</h5>
    <h6>Hello World 6</h6>
    
  </body>
</html>

 

 
 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>字体标记的使用</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     This is my JSP page. <br>
25     <font size="4" color="red" face = "隶书">
26      石家庄铁道大学 </font>  <br>
27      
28     <font size="5" color ="blue" face="楷书">
29     石家庄铁道大学 </font>  <br>
30     
31     <font size ="6" color ="gream" face ="黑体">
32     石家庄铁道大学 </font>   <br>
33     
34   </body>
35 </html>
 
原文地址:https://www.cnblogs.com/rainbow-1/p/13832710.html