Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
27 changes: 21 additions & 6 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry exported="true" kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</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"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry including="**/*.java" kind="src" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/Users/a0gueva/Downloads/mysql-connector-java-5.1.34/mysql-connector-java-5.1.34-bin.jar"/>
<classpathentry kind="output" path="build"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/target
9 changes: 8 additions & 1 deletion .project
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,20 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.springsource.ide.eclipse.gradle.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<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.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.palantir.handlebars.handlebarsNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#org.springsource.ide.eclipse.gradle.core.preferences.GradleImportPreferences
#Thu Jan 01 12:40:10 PST 2015
addResourceFilters=true
afterTasks=afterEclipseImport;
beforeTasks=cleanEclipse;eclipse;
enableAfterTasks=true
enableBeforeTasks=true
enableDSLD=false
enableDependendencyManagement=true
projects=;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
#Thu Jan 01 22:55:37 PST 2015
build.family.org.gradle.tooling.model.eclipse.HierarchicalEclipseProject=;
org.springsource.ide.eclipse.gradle.classpath.enableSorting=true
org.springsource.ide.eclipse.gradle.linkedresources=
org.springsource.ide.eclipse.gradle.rootprojectloc=
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#org.springsource.ide.eclipse.gradle.core.actions.GradleRefreshPreferences
#Thu Jan 01 12:40:10 PST 2015
addResourceFilters=true
afterTasks=afterEclipseImport;
beforeTasks=cleanEclipse;eclipse;
enableAfterTasks=true
enableBeforeTasks=true
enableDSLD=false
useHierarchicalNames=false
12 changes: 9 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
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.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
5 changes: 3 additions & 2 deletions .settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="tvs">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="tvs"/>
<property name="java-output-path" value="/tvs/build/classes"/>
<property name="context-root" value="product-loader"/>
</wb-module>
</project-modules>
4 changes: 2 additions & 2 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<fixed facet="jst.web"/>
<fixed facet="java"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="java" version="1.6"/>
</faceted-project>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.wst.validation.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1
Binary file added WebContent/.DS_Store
Binary file not shown.
33 changes: 33 additions & 0 deletions WebContent/META-INF/context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Context>

<!-- maxActive: Maximum number of database connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to -1 for no limit.
-->

<!-- maxIdle: Maximum number of idle database connections to retain in pool.
Set to -1 for no limit. See also the DBCP documentation on this
and the minEvictableIdleTimeMillis configuration parameter.
-->

<!-- maxWait: Maximum time to wait for a database connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->

<!-- username and password: MySQL username and password for database connections -->

<!-- driverClassName: Class name for the old mm.mysql JDBC driver is
org.gjt.mm.mysql.Driver - we recommend using Connector/J though.
Class name for the official MySQL Connector/J driver is com.mysql.jdbc.Driver.
-->

<!-- url: The JDBC connection url for connecting to your MySQL database.
-->

<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
maxActive="10" maxIdle="5" maxWait="10000"
username="root" password="" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/test"/>

</Context>
30 changes: 30 additions & 0 deletions WebContent/WEB-INF/log4j.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true"
xmlns:log4j='http://jakarta.apache.org/log4j/'>

<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="[%p] %d [%t] %x %c %M - %m%n" />
</layout>
</appender>

<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="false" />
<param name="maxFileSize" value="10MB" />
<param name="maxBackupIndex" value="10" />
<param name="file" value="${catalina.home}/logs/tomcat.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
</layout>
</appender>

<root>
<level value="INFO" />
<appender-ref ref="console" />
<appender-ref ref="file" />
</root>

</log4j:configuration>
37 changes: 37 additions & 0 deletions WebContent/WEB-INF/spring/context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd>
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

<context:annotation-config />

<mvc:default-servlet-handler/>

<context:component-scan base-package="com.ag.tvs" />

<mvc:annotation-driven />

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>

<bean
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />


</beans>
116 changes: 116 additions & 0 deletions WebContent/WEB-INF/views/maintest.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script>
window.onload = function () {
define("product/data", {"data":<c:out value="${data}" escapeXml="false" />});
// Invoke onehg landing page view
require(["views/app"], function () {});
};
</script>
<html>
<head>
<script data-main="../app/main.js" src="../lib/require.js"></script>
<link rel="stylesheet" media="screen" href="../styles/jquery-ui.css">
<link rel="stylesheet" media="screen" href="../styles/bootstrap.css">
<link rel="stylesheet" media="screen" href="../styles/product.css">
<link rel="stylesheet" media="screen" href="../styles/item-shelf.css">
<link rel="stylesheet" media="screen" href="../styles/carousel.css">
<link rel="stylesheet" media="screen" href="../styles/index.css">
<link rel="stylesheet" media="screen" href="../styles/footer.css">
<link rel="stylesheet" media="screen" href="../styles/tabs.css">
<link rel="stylesheet" media="screen" href="../styles/cart/cart.css">
<link rel="stylesheet" media="screen" href="../styles/googlefonts.css">
<link href='http://fonts.googleapis.com/css?family=Sintony:400,700' rel='stylesheet' type='text/css'>
</head>
<body>
<section class="tv-finder-main">
<section class="product-finder-pov">
<div class="gh-splash">
<div class="title">Get More, For Less</div>
<div class="banner">Find the perfect Television with our new <span class="finder">TVFinder</span><sup class="tm">TM</sup></div>
<img src="../img/tv-finder-pov.png"/>
</div>
</section>
<section class="js-shelf-filter product-finder-filter-container">
</section>
<div class="js-shelf-page">
<%-- @include file="shelf-view.jsp" --%>
</div>
<div class="js-product-page">
<%-- @include file="shelf-view.jsp" --%>
</div>
</section>
</section>

<footer class="js-global-footer footer">

<form class="mailing-list" action="/">
<input class="email" type="email" name="email" placeholder="Sign up for our Mailing List" title="Sign up for our Mailing List">
<button class="sign-up" id="sign-up" type="submit" name="sign-up">Sign Up</button>
</form>

<div class="footer-links">
<section class="column">
<h3>Get to know us</h3>
<a class="link" href="http://walmartstores.com/">Corporate</a>
<a class="link" href="http://walmartstores.com/aboutus">Our Story</a>
<a class="link" href="http://walmartstores.com/pressroom">News &amp; Views</a>
<a class="link" href="http://walmartstores.com/communitygiving">Giving Back</a>
<a class="link" href="http://walmartstores.com/sustainability">Global Responsibility</a>
<a class="link" href="http://walmartstores.com/investors">Investors</a>
<a class="link" href="http://walmartstores.com/suppliers">Suppliers</a>
<a class="link" href="http://walmartstores.com/careers">Careers</a>
</section>

<section class="column">
<h3>Walmart.com</h3>
<a class="link" href="http://www.walmart.com/catalog/catalog.gsp?cat=542412">About Walmart.com</a>
<a class="link" href="http://www.walmart.com/catalog/catalog.gsp?cat=538449">Terms of Use</a>
<a class="link" href="http://affiliates.walmart.com/aff_home.jsp">Affiliate Program</a>
<a class="link" href="http://public.conxport.com/walmart/sponsorship/home.aspx">Sponsorship Submission</a>
<a class="link" href="http://www.walmart.com/catalog/catalog.gsp?cat=538456">International Customers</a>
<a class="link" href="http://www.walmart.com/cservice/contextual_help_popup.gsp?modId=971879">About Our Ads</a>
<a class="link" href="http://www.walmart.com/cservice/ca_storefinder.gsp">Store Finder</a>
<a class="link" href="http://coupons.walmart.com/?povid=cat14503-env172199-module092411-lLinkISNCOUPON">Printable Coupons</a>
<a class="link" href="http://www.walmart.com/wf.gsp/a_d_registration_flow/landing">Associate Discount</a>
<a class="link" href="http://walmartstores.com/PrivacySecurity/?sourceid=walmart.com-footer">Privacy &amp; Security</a>
<a class="link" href="http://walmartstores.com/9243.aspx#California">California Privacy Rights</a>
<a class="link" href="http://www.WalmartLabs.com">@WalmartLabs</a>
<a class="link" href="http://www.walmart.com/catalog/catalog.gsp?cat=121828">See All Departments</a>
</section>

<section class="column">
<h3>Help</h3>
<a class="link" href="http://www.walmart.com/catalog/catalog.gsp?cat=5436">Help Center</a>
<a class="link" href="http://www.walmart.com/cservice/li_trackorder.gsp?NavMode=2">Track Your Order</a>
<a class="link" href="http://www.walmart.com/catalog/catalog.gsp?cat=538459">Returns Policy</a>
<a class="link" href="http://www.walmart.com/returns/returns_type.gsp">Return an Item</a>
<a class="link" href="http://walmartstores.com/Recalls/">Product Recalls</a>
<a class="link" href="http://www.walmart.com/cservice/cu_comments_online.gsp?cu_heading=8">Contact Us</a>
<a class="link" href="">Feedback</a>
</section>

<section class="column">
<h3>In the spotlight</h3>
<a class="link" href="">Black Friday</a>
<a class="link" href="">Cyber Monday</a>
<a class="link" href="">Thanksgiving</a>
<a class="link" href="">Laptops</a>
<a class="link" href="">iPads and Tablets</a>
<a class="link" href="">Appliances</a>
<a class="link" href="">TVs</a>
<a class="link" href="">Toys</a>
<a class="link" href="">eGift Cards</a>
<a class="link" href="">Best Sellers</a>
<a class="link" href="">New Arrivals</a>
<a class="link" href="">Top-Rated Items</a>
</section>

<aside>
<h3>Walmart Money Centre</h3>
<a class="" href=""><img src="/images/money_center.png" alt="Walmart Money Center" width="310" height="304"></a>
</aside>
</div>

</footer>
</body>
</html>
18 changes: 18 additions & 0 deletions WebContent/WEB-INF/views/product-view.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="shelf-item-img">
<a href="#/product/${product.id }"><img class="lazy" src="${product.image}"/></a>
</div>
<div class="shelf-item-name">
${product.name}
</div>
<div class="shelf-item-desc">
${product.description}
</div>
<div class="shelf-item-price">
${product.dispPrice.dollars}<span class="dollar">.${product.dispPrice.cents}</span></span>
</div>
<div class="product-rating shelf-item-rating " >
<span class="gray">
<span class="gold" style="width:${product.rating}">
</span>
</span>
</div>
14 changes: 14 additions & 0 deletions WebContent/WEB-INF/views/shelf-view.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="product-finder-filter-results">
<div class="product-finder-filter-msg">
<span class="item-counter item-counter-bold">{{matches}} matches</span><span class="item-counter"> for televisions fitting that criteria</span>
</div>
<input type="button" value="Clear Filters " class="product-finder-filter-clear-btn">
</div>
<div class="js-product-list shelf-view-container">
<c:forEach var="product" items="${products}">
<div class="shelf_item">
<%@include file="product-view.jsp" %>
</div>
</c:forEach>
</div>
Loading