<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>显示购物车购物信息</title>
</head>
<body>
你选择的结果是:<br>
<%request.setCharacterEncoding("utf-8");
String str=" ";
if(session.getAttribute("s1")!=null){
str=(String)session.getAttribute("s1");
out.println(str+"<br>");
}
if(session.getAttribute("s2")!=null){
str=(String)session.getAttribute("s2");
out.println(str+"<br>");
}
if(session.getAttribute("s3")!=null){
str=(String)session.getAttribute("s3");
out.println(str+"<br>");
}
if(session.getAttribute("s4")!=null){
str=(String)session.getAttribute("s4");
out.println(str+"<br>");
}
if(session.getAttribute("s5")!=null){
str=(String)session.getAttribute("s5");
out.println(str+"<br>");
}
if(session.getAttribute("s6")!=null){
str=(String)session.getAttribute("s6");
out.println(str+"<br>");
}
%>
<br><br>
<a href="d.jsp">去结算</a><br>
继续购物:<br>
<a href="a.jsp">肉类</a>
<a href="b.jsp">球类</a>
</body>
</html>
转载于:https://www.cnblogs.com/www-hsy-com/p/7668573.html