第二次JSP作业
程序员文章站
2022-03-26 22:42:11
1.代码 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getSche ......
1.代码
<%@ page language="java" import="java.util.*" pageencoding="utf-8"%> <% string path = request.getcontextpath(); string basepath = request.getscheme()+"://"+request.getservername()+":"+request.getserverport()+path+"/"; %> <!doctype html public "-//w3c//dtd html 4.01 transitional//en"> <html> <head> <base href="<%=basepath%>"> <title>my jsp 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body> <%-- 大写字母表 --%> <%! string name="大写26字母表" ;%> <%=name %> <br> <%-- 使用了脚本,中利用for循环结构 --%> <% for(char i='a';i<='z';i++){ out.println(""+i); } %> <br> <br> <br> <%-- 小写字母表 --%> <%! string mingzi="小写26字母表"; %> <%=mingzi %> <br> <% for(char b='a';b<='z';b++){ out.println(""+b); } %> </body> </html>
2.运行图片
上一篇: MySQL事务隔离级别与相关示例(脏读、不可重复读、幻读)
下一篇: vue-router实例