diff --git a/index.jsp b/index.jsp new file mode 100644 index 000000000..0abd667f1 --- /dev/null +++ b/index.jsp @@ -0,0 +1,947 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="java.util.*, java.text.*" %> + + + + + + + + ShopHub - Premium E-Commerce Store + + + + <% + // JSP Server-side code + Date currentDate = new Date(); + SimpleDateFormat dateFormat = new SimpleDateFormat("EEEE, MMMM dd, yyyy"); + String formattedDate = dateFormat.format(currentDate); + + // Session handling + Integer cartItems = (Integer) session.getAttribute("cartItems"); + if (cartItems == null) { + cartItems = 0; + } + + String userName = (String) session.getAttribute("userName"); + if (userName == null) { + userName = "Guest"; + } + %> + + +
+
+
+
+ 📅 <%= formattedDate %> + 🎉 Free Shipping on Orders Over $50! +
+
+ Track Order + Support + Contact +
+
+
+ + + + +
+ + +
+
+

Welcome to ShopHub

+

Discover Amazing Products at Unbeatable Prices

+ Shop Now + Browse Categories +
+
+ + +
+
+

Shop by Category

+ +
+
+
đŸ’ģ
+

Electronics

+

Latest gadgets and tech

+
+ +
+
👔
+

Fashion

+

Trendy clothing & accessories

+
+ +
+
🏠
+

Home & Living

+

Decor and essentials

+
+ +
+
âšŊ
+

Sports

+

Fitness & outdoor gear

+
+
+
+
+ + +
+
+

Featured Products

+ +
+ + + + +
+ +
+ <% + // Sample product data - in real application, this would come from database + String[][] products = { + {"đŸ’ģ", "Wireless Headphones", "Electronics", "Premium noise-cancelling headphones with 30-hour battery life", "89.99", "129.99", "SALE"}, + {"📱", "Smart Watch Pro", "Electronics", "Advanced fitness tracking and notifications on your wrist", "199.99", "", "NEW"}, + {"👕", "Designer T-Shirt", "Fashion", "Premium cotton blend with modern design", "29.99", "49.99", "SALE"}, + {"👟", "Running Shoes", "Sports", "Lightweight and comfortable for long-distance running", "79.99", "", ""}, + {"🎧", "Bluetooth Speaker", "Electronics", "Portable speaker with crystal clear sound", "49.99", "69.99", "SALE"}, + {"👜", "Leather Handbag", "Fashion", "Genuine leather with multiple compartments", "149.99", "", "NEW"}, + {"📷", "Digital Camera", "Electronics", "Professional 24MP camera with 4K video", "599.99", "799.99", "SALE"}, + {"⌚", "Classic Watch", "Fashion", "Elegant timepiece for any occasion", "119.99", "", ""} + }; + + for (String[] product : products) { + %> +
+
+ <%= product[0] %> + <% if (!product[6].isEmpty()) { %> + "> + <%= product[6] %> + + <% } %> +
+
+
<%= product[2] %>
+

<%= product[1] %>

+

<%= product[3] %>

+
+ ⭐ + ⭐ + ⭐ + ⭐ + ⭐ +
+ +
+
+ <% } %> +
+
+
+ + +
+
+

Why Shop With Us

+ +
+
+
🚚
+

Free Shipping

+

Free delivery on all orders over $50. Fast and reliable shipping worldwide.

+
+ +
+
🔒
+

Secure Payment

+

100% secure payment processing. Your data is safe with us.

+
+ +
+
â†Šī¸
+

Easy Returns

+

30-day return policy. No questions asked, hassle-free returns.

+
+ +
+
đŸ’Ŧ
+

24/7 Support

+

Round-the-clock customer support. We're here to help anytime.

+
+
+
+
+ + +
+
+

Subscribe to Our Newsletter

+

Get the latest updates on new products and upcoming sales

+ + +
+
+ + + + + + +