本文共 1415 字,大约阅读时间需要 4 分钟。
<%@ taglib prefix="s" uri="/struts-tags" %><%@ page import="employee.emp" %><%@ page import="java.lang.reflect.Array" %><%@ page import="javax.naming.Context" %><%@ page import="java.util.*" %><%--suppress XmlInvalidId --%><%-- Created by IntelliJ IDEA. User: biong Date: 2019/11/28 Time: 9:43 To change this template use File | Settings | File Templates.--%><%@ page contentType="text/html;charset=UTF-8" language="java" %><%-- <% ArrayList list = (ArrayList) request.getAttribute("employees");%>--%><%-- <% emp emp = (emp) list.get(0);%>--%><%-- <%System.out.println(emp.getSex());%>--%>INDEX <%--<%--%><%-- String path = request.getContextPath();--%><%-- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";--%><%--%>--%>员工表:
id | 姓名 | 性别 | 年龄 | 入职日期 | 离职日期 | 职务 | 年限 | 操作 | |
---|---|---|---|---|---|---|---|---|---|
${user.id} | ${user.name} | ${user.sex} | ${user.age} | ${user.cometime} | ${user.outtime} | ${user.position} | ${user.workyears} | <%--${user.relation} | --%>修改 删除 |
添加 <%-- 这里跳转之后好像将原来容器中的内容去掉了,在新页面中拿不到值所以这里需要一个action--%> |
前端获取数据的方式不需要用base的方式直接和我一样即可
效果:
转载地址:http://aawlf.baihongyu.com/