<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'left.jsp' starting page</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 href="${pageContext.request.contextPath}/back/css/style.css"
rel="stylesheet" type="text/css" />
</head>
<body>
<div class="header">
<div class="header03"></div>
<div class="header01"></div>
<div class="header02"></div>
</div>
<div>
<c:forEach var="it" items="${list}">
${it.goods_type_id}<br />
${it.goods_type_name}<br />
</c:forEach>
</div>
</body>
</html>
得到request内容,并且用foreach
最新推荐文章于 2022-07-17 02:02:00 发布