Skip to content

Commit

Permalink
仿淘宝B2C购物网站
Browse files Browse the repository at this point in the history
  • Loading branch information
mission008 committed Sep 2, 2014
0 parents commit 65b8745
Show file tree
Hide file tree
Showing 196 changed files with 6,854 additions and 0 deletions.
Binary file added B2C商城.doc
Binary file not shown.
18 changes: 18 additions & 0 deletions Shop/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
36 changes: 36 additions & 0 deletions Shop/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Shop</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
12 changes: 12 additions & 0 deletions Shop/.settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="WebContent"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
7 changes: 7 additions & 0 deletions Shop/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
9 changes: 9 additions & 0 deletions Shop/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="Shop">
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/test"/>
<property name="context-root" value="Shop"/>
<property name="java-output-path" value="/Shop/build/classes"/>
</wb-module>
</project-modules>
10 changes: 10 additions & 0 deletions Shop/.settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v7.0"/>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="java"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
1 change: 1 addition & 0 deletions Shop/.settings/org.eclipse.wst.jsdt.ui.superType.container
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
1 change: 1 addition & 0 deletions Shop/.settings/org.eclipse.wst.jsdt.ui.superType.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
3 changes: 3 additions & 0 deletions Shop/WebContent/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

12 changes: 12 additions & 0 deletions Shop/WebContent/Test.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Hello Shop!!!!
</body>
</html>
Binary file added Shop/WebContent/WEB-INF/lib/IKAnalyzer2012.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/antlr-2.7.6.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/asm-3.3.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/asm-commons-3.3.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/asm-tree-3.3.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/commons-io-2.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/dom4j-1.6.1.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/ehcache-1.5.0.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/hibernate3.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/java-mail-1.4.4.jar
Binary file not shown.
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/jstl.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/jta-1.1.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/junit-4.9b2.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/log4j-1.2.17.jar
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/lucene-core-3.6.0.jar
Binary file not shown.
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/ognl-3.0.6.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Library-SymbolicName: org.springframework.spring
Library-Version: 3.0.5.RELEASE
Library-Name: Spring Framework
Import-Bundle:
org.springframework.aop;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.asm;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.aspects;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.beans;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.context;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.context.support;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.core;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.expression;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.jdbc;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.jms;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.orm;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.oxm;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.transaction;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.web;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.web.servlet;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
org.springframework.web.portlet;version="[3.0.5.RELEASE, 3.0.5.RELEASE]",
com.springsource.org.aopalliance;version="[1.0.0, 1.0.0]"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/slf4j-api-1.6.1.jar
Binary file not shown.
Binary file not shown.
Binary file added Shop/WebContent/WEB-INF/lib/standard.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
57 changes: 57 additions & 0 deletions Shop/WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Shop</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>

<filter>
<filter-name>ManagerFilter</filter-name>
<filter-class>com.cn.shop.filter.ManagerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ManagerFilter</filter-name>
<url-pattern>/manager/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>openSessionInViewFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>







<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
<!-- default: /WEB-INF/applicationContext.xml -->
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<!-- <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value> -->
<param-value>classpath:beans.xml</param-value>
</context-param>

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
119 changes: 119 additions & 0 deletions Shop/WebContent/cart.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<% String context = request.getContextPath(); %>

<%@taglib uri="/struts-tags" prefix="s" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的购物车</title>
<SCRIPT language=javascript>
function clearCart(){
cartForm.action="cart_clear?method=clear";
cartForm.submit();
}
function deleteCartItem(){
cartForm.action="cart_delete?method=deleteItem";
cartForm.submit();
}
function modifyNumber(){
cartForm.action="cart_modify?method=modifyItemNumber";
cartForm.submit();
}
</SCRIPT>
</head>
<body>
<H1 align=center>
购物车
</H1>
<FORM name=cartForm action="<%=context %>/from/listaction!list" method=post>
<input type="hidden" name="method" value="index" />
<TABLE cellSpacing=0 cellPadding=0 width="75%" align=center border=1>
<TBODY>
<TR align=middle>
<TD width="7%">
选择
</TD>
<TD width="21%" height=30>
商品名称
</TD>
<TD width="14%" height=30>
单价
</TD>
<TD width="25%" height=30>
数量
</TD>
<TD width="33%" height=30>
合计
</TD>
</TR>
<c:forEach var="item" items="${sessionScope.cart.items}">
<TR align=middle>
<TD height=30>
<INPUT type=checkbox value=${item.key } name=itemCheck>
</TD>
<TD height=30>
${item.value.product.name}
</TD>
<TD height=30>
${item.value.product.price}
</TD>
<TD height=30>
<INPUT maxLength=10 size=10 value=${item.value.number
} name="number${item.key}">
</TD>
<TD height=30>
${item.value.cost}
</TD>
</TR>
</c:forEach>
<TR>
<TD colSpan=5 height=30>
您的购物车中所有商品总金额:${sessionScope.cart.price }
</TD>
</TR>
</TBODY>
</TABLE>
<BR>
<BR>
<TABLE cellSpacing=0 cellPadding=0 width=450 align=center border=0>
<TBODY>
<TR align=middle>
<TD width="22%">
<INPUT onclick=modifyNumber() type=button value=修改所选项的数量
name=Button>
</TD>
<TD width="20%">
<INPUT onclick=deleteCartItem() type=button value=删除所选项
name=Submit2>
</TD>
<TD width="26%">
<INPUT onclick="clearCart();" type=button value=清空购物车
name=Submit3>
</TD>
<TD width="12%">
<INPUT
onclick="javascript:location.href='order_index?method=index'"
type=button value=结账 name=Submit42>
</TD>
<TD width="20%">
<INPUT
onclick="javascript:location.href='listaction?method=list'"
type=button value=继续购物 name=Submit42>
</TD>
</TR>
</TBODY>
</TABLE>
<P align=center>
&nbsp;
</P>
</FORM>


</body>
</html>
14 changes: 14 additions & 0 deletions Shop/WebContent/fail.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

Fail!!!!

</body>
</html>
25 changes: 25 additions & 0 deletions Shop/WebContent/find.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<% String context = request.getContextPath(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>搜索商品</title>
</head>
<body>

<form action="<%=context %>/from/find" method="post">

搜索框:<input type="text" name="keyword"><br>

<input type="submit" value="提交">

<input type="reset" value="重置">



</form>

</body>
</html>
Loading

0 comments on commit 65b8745

Please sign in to comment.