使用MongoDB和JSP实现一个简单的购物车系统实例(7)

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"https://www.jb51.net/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="https://www.jb51.net/<%=basePath%>"> <title>注册成功</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 type="text/css" href="https://www.jb51.net/css/login.css"> </head> <body> <div> <div> <h1>恭喜您,您已经成功注册简单购物车系统</h1> </div> <div> <button>返回</button> </div> </div> </body> </html>

2.6.3查看商品

首先看一下购物首页welcome.jsp页面代码:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"https://www.jb51.net/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="https://www.jb51.net/<%=basePath%>"> <title>购物页面</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 type="text/css" href="https://www.jb51.net/styles.css"> --> </head> <frameset rows="30%,60%,10%" cols="*" frameborder="no" framespacing="0"> <frame src="https://www.jb51.net/header.jsp"> <frame src="https://www.jb51.net/main_shop.jsp"> <frame src="https://www.jb51.net/bottom.jsp"> </frameset> <body> </body> </html>

首页头部header.jsp页面代码:

<%@ page language="java" import="java.util.*" contentType="text/html;charset=gb2312" pageEncoding="gb2312"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"https://www.jb51.net/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="https://www.jb51.net/<%=basePath%>"> <title></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"> <meta http-equiv="Content-Type" content="text/html;charset=gb2312"> </head> <body topmargin="0" leftmargin="0" rightmargin="0"> <form action=""> <table cellpadding="0" cellspacing="0" align=center> <tr> <td bgcolor="F9A859" valign="top"> <table cellpadding="0" cellspacing="0" bgcolor="#466BAF"> <tr> <td> 简单购物车系统 </td> </tr> </table> </td> </tr> <tr> <td bgcolor="F9A859" valign="top"> <table cellpadding="0" cellspacing="0" bgcolor="#CC865E"> <tr> <td> 欢迎你访问!</td> </tr> </table> </td> </tr> </table> </form> </body> </html>

尾部bottom.jsp页面代码:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wzjxds.html