• 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 '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>
       <jsp:include page="circle.jsp" flush="true">
        <jsp:param  name="right" value="8"/>
        </jsp:include>
        <br>
        <jsp:include page="ladder.jsp">
        <jsp:param value="8" name="shang"/>
        <jsp:param value="8" name="xia"/>
        <jsp:param value="8" name="high"/>
        </jsp:include>
      </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 'ladder.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 a=request.getParameter("shang");
      String b=request.getParameter("xia");
      String c=request.getParameter("high");
      double d=Double.parseDouble(a);
      double e=Double.parseDouble(b);
      double f=Double.parseDouble(c);
      out.print("梯形面积为:"+((d+e)*f/2));
       %>
      </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 'circle.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 a=request.getParameter("right");
      double b=Double.parseDouble(a);
      double pi=3.14;
      out.print("圆的面积为:"+(pi*b*b));
       %>
      </body>
    </html>

  • 相关阅读:
    prometheus 文档
    go
    nginx
    python使用xlrd读取合并单元格
    python使用xlrd模块读取Excel
    创建Excel文件:ModuleNotFoundError: No module named 'openpyxl'
    openpyxl模块安装时报错: You are using pip version 19.2.3, however version 20.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    Python定义字典函数报错TypeError: takes 0 positional arguments but 1 was given
    Mysql--information_scherma(虚拟库)
    day07--MySQL索引
  • 原文地址:https://www.cnblogs.com/zq542960954/p/12559020.html
Copyright © 2020-2023  润新知