1、教材p39实验3(听英语)

<%@ 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 'audio.jsp' starting page</title> </head> <body bgcolor=pink>
<embed src="任务一素材/english.mp3"autostart=false>
课文音频
</embed>
</body>
</html>
<%@ page contentType="textml"%>
<%@ page 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> </head> <body bgcolor=cyan>
<br>英文课文(English Text):<br/>
<p style="font-family:宋体;font-size:18;color:black">
<jsp:include page="English/english.txt"/>
<br>课文音频(English Audio):<br/>
<jsp:include page="audio.jsp"/>
</p>
</body>
<ml>

2、教材p45第8题

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head> <title>My JSP 'main.jsp' starting page</title> </head> <body bgcolor=Thistle>
<jsp:include page="circle.jsp">
<jsp:param value="5" name="r"/>
</jsp:include>
<p>--------分割线--------</p>
<jsp:include page="ladder.jsp">
<jsp:param value="5" name="sd"/>
<jsp:param value="8" name="xd"/>
<jsp:param value="8" name="h"/>
</jsp:include>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head> <title>My JSP 'circle.jsp' starting page</title> </head> <body>
我是被加载的求圆形面积界面
<%
String r=request.getParameter("r");
double b=Double.parseDouble(r);
double area=3.14*b*b;
out.print(area);
%>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head> <title>My JSP 'ladder.jsp' starting page</title> </head> <body>
我是被加载的求梯形面积界面
<%
String sd=request.getParameter("sd");
String xd=request.getParameter("xd");
String h=request.getParameter("h");
double s=Double.parseDouble(sd);
double x=Double.parseDouble(xd);
double H=Double.parseDouble(h);
double area=(s+x)*H/2;
out.print(area);
%>
</body>
</html>

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
<head>
<title>M</title>
<style type="text/css">
.box{
width: 460px;
height: 90px;
display:flex;
justify-content:center;
align-items:center;
}
.top{
width: 460px;
height: 30px;
line-height: 30px;
background: green;
text-align: center;
}
.left{
width: 230px;
height: 30px;
line-height: 30px;
background: red;
text-align: center;
float:left;
}
.main{
width: 230px;
height: 30px;
line-height: 30px;
background: blue;
text-align: center;
float:right;
}
.end{
width: 460px;
height: 30px;
line-height: 30px;
background: yellow;
text-align: center;
}
</style>
</head> <body>
<div class="box">
<div class="top">
<jsp:include page="3.top.jsp"></jsp:include>
</div>
<div class="left">
<jsp:include page="3.left.jsp"></jsp:include>
</div>
<div class="main">
<jsp:include page="3.main.jsp"></jsp:include>
</div>
<div class="end">
<jsp:include page="3.end.jsp"></jsp:include>
</div>
</div>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
top.jsp文件
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
left.jsp文件
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
main.jsp文件
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
end.jsp文件

<%@ 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 'first.jsp' starting page</title>
</head>
<body>
<%
String r=request.getParameter("i");
int x=Integer.parseInt(r);
out.print("随机数"+x); %><br>
Hello,我是奇数!!! </body>
</html>
<%@ 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 'first.jsp' starting page</title>
</head>
<body>
<%
String r=request.getParameter("i");
int x=Integer.parseInt(r);
out.print("随机数"+x); %><br>
Hello,我是偶数!!!
</body>
</html>
<%@ 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 'first.jsp' starting page</title>
</head>
<body>
<%
int i = (int) (Math.random() * 10 + 1);
if (i % 2 == 0) {
%>
<jsp:forward page="second.jsp">
<jsp:param value="<%=i %>" name="i" />
</jsp:forward>
<%
} else {
%>
<jsp:forward page="first.jsp">
<jsp:param value="<%=i %>" name="i" />
</jsp:forward>
<%
}
%>
</body>
</html>

最新文章

  1. 初识JAVA(二)(送给Java和安卓初学者)----常见错误
  2. ln 软硬链接
  3. FingerprintJS - 在浏览器端实现指纹识别
  4. struts2 Advanced Learning
  5. PHP设计模式(一)
  6. JS中的event 对象详解
  7. iOS移动开发周报-第23期
  8. Entity Framework中的Migration问题
  9. haskell模块(modules)
  10. log4net logfornet 配置和用法
  11. QT绘制半透明窗体(改写paintEvent,超级简单)
  12. 汇编指令-bic(位清除)、orr(位或)(3)
  13. 【spring实战第五版遇到的坑】第14章spring.cloud.config.uri和token配置项无效
  14. Anaconda python环境管理
  15. 课堂小记---JavaScript(3)
  16. 【转帖】系统软件工程师必备技能-进程内存的working set size(WSS)测量
  17. PHP反射学习总结
  18. PATH环境变量
  19. Xcode中控制台中打印中文处理
  20. tomcat源码分析-初始化过程

热门文章

  1. 04jsp(1)
  2. gauva cache
  3. Oracle11g空表导出设置
  4. centos7 添加自定义程序为系统服务
  5. mfcc vs fbank
  6. go环境搭建及tjfoc-gm安装
  7. 设置Redhat终端显示中文
  8. 【剑指Offer】【栈】包含min函数的栈
  9. c中遍历lua的表
  10. oracle的ASM扩容