在昨天作业的基础之上,使用EL+JSTL 替换项目中的 JSP代码
index:
<%@ page import="com.qiku.entity.User" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
Created by IntelliJ IDEA.
User: fate.j
Date: 2022/5/17
Time: 19:08
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
主页
<%
User user = (User) session.getAttribute("user");
request.setAttribute("user",user);
%>
<%-- 登录成功,欢迎 <%= user.getUsername()%>--%>
登录成功,欢迎
${user.username}
请登录
注册
login:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
Created by IntelliJ IDEA.
User: fate.j
Date: 2022/5/17
Time: 19:22
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
注册



