javaweb基础编程

<%@ page language=“java” contentType=“text/html; charset=UTF-8”
    pageEncoding=“UTF-8”%>
    <%@ page import=“java.util.Date” %>
    <%@ page import=“java.text.SimpleDateFormat” %>

Insert title here

Hello World

shixinfa

史新发

  1. shixinfa
  2. lilaoshi
  3. zhangyan
姓名 语文 数学 英语 张三 90 8 89 李四 70 28 9 查看详情 用户名 : 密码:

应用选择器

应用该选择器

<%
 Date date=new Date();
SimpleDateFormat df=new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);
String today=df.format(date);
%>
<%=today %>

<%@page import=“com.mysql.jdbc.Util”%>
<%@page import=“org.apache.jasper.tagplugins.jstl.core.Import”%>
<%@ page language=“java” import=“java.util.*” pageEncoding=“utf-8”%>
<%@ taglib prefix=“c” uri=“http://java.sun.com/jsp/jstl/core”%>
<jsp:useBean id=“user” class=“com.sxf.User” />

Insert title here ${"我是个屌丝" } <% String name[] = { "shixinfa", "zhangyan", "lixiaolong" }; request.setAttribute("names", name); %> ${ requestScope.names[2] }; <% ArrayList list = new ArrayList(); list.add(1); list.add(22); list.add(33); request.setAttribute("list", list); %> ${requestScope.list[2]}; ${2>3 ?  "yes":"no"}; ${requestScope.adminname}  ${sessionScope.username } ${user.username};  ${user.password};

<c:set target=" u s e r &quot; p r o p e r t y = &quot; u s e r n a m e &quot; v a l u e = &quot; z h a n g y a n &quot; / &gt; &lt; c : s e t t a r g e t = &quot; {user}&quot; property=&quot;username&quot; value=&quot;zhangyan&quot; /&gt; &lt;c:set target=&quot; {user}" property=“password” value=“shixinfa” />
${user.username}; 
${user.password};


本文来自 言寡 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/qq_21406125/article/details/81605816?utm_source=copy

猜你喜欢

转载自blog.csdn.net/weixin_37565521/article/details/82940021