zoukankan      html  css  js  c++  java
  • 第三次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="5"/>
        </jsp:include>
        <br>
        <jsp:include page="ladder.jsp">
        <jsp:param value="2" name="shang"/>
        <jsp:param value="3" name="xia"/>
        <jsp:param value="1.5" 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 '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 a=request.getParameter("right");
      double b=Double.parseDouble(a);
      double pi=3.14;
      out.print("圆的面积为:"+(pi*b*b));
       %>
      </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 '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 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));
       %>
        <br>
      </body>
    </html>
    

      

  • 相关阅读:
    毕业论文(设计)开题报告
    jqgrid工作记录1(单元格内容过长三个点显示,表头自动换行,取消滚动条预留空间)
    mysql递归查询(父级,子集)
    ORACLE--SQL日常问题和技巧2(自定义排序,递归查询,异常ORA-01747,逗号隔开的字符串转成in条件,用符号连接表中某字段)
    随机图片获取api
    ubuntu16.04下安装Qt5.9
    Ubuntu16.04更换下载源(图形界面更改)
    VM虚拟机黑屏,但是在运行状态的解决方法之一
    Ubuntu终端快捷复制粘贴
    VIM的部分配置()
  • 原文地址:https://www.cnblogs.com/zf08/p/12557521.html
Copyright © 2011-2022 走看看