zoukankan      html  css  js  c++  java
  • JSP/Servlet及相关技术详解

    JSP声明

    <%!声明部分%>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <base href="<%=basePath%>">

    <title>欢迎</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>
    <%!
    //声明一个整数变量
    public int count;
    /*
    定义一个方法
    */
    public String info(){
    return "hello";
    }
    %>
    <body>
    this is my test page !
    <br>
    <%=count++ %>
    <%=info() %>

    </body>
    </html>

     输出JSP表达式

    <%=表达式%>

    <%=count++ %>
    <%=info() %>

    替代out.println输出语句,输出表达式语法后不能有分号

     JSP脚本

    JSP的3个编译指令

     JSP脚本的9个内置对象

  • 相关阅读:
    php中的form表单
    http
    PHP做的简单计算器
    用Js写贪吃蛇
    ajax简单操作,验证用户名是否可以
    关于ARM PC值
    阅读脚本控制pwm代码
    编译选项
    关于机器码、原码、反码、补码
    makefile学习之函数
  • 原文地址:https://www.cnblogs.com/wxc-kingsley/p/7387720.html
Copyright © 2011-2022 走看看