jsp

作者: simplerandom | 来源:发表于2020-06-23 11:27 被阅读0次

    my.jsp必须放在webapp目录下

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        <h1>jsp</h1>
        <% out.println("hello"); %> 
        <%= request.getRemoteAddr() %>
    </body>
    </html>
    

    jsp指令

    引入java包

    <%@ page import="java.util.*" %>
        <% out.println("hello");
        int[] ints = {55, 2, 66};
        Arrays.sort(ints);
        out.println(Arrays.toString(ints));
         %>
    

    引入其他jsp页面

    <%@ include file="header.jsp"%>
    

    相关文章

      网友评论

          本文标题:jsp

          本文链接:https://www.haomeiwen.com/subject/rrgcfktx.html