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
11 changes: 11 additions & 0 deletions src/main/java/Config.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Config {
public String getUrl() {
return "jdbc:mysql://localhost/adlister_db?serverTimezone=UTC&useSSL=false";
}
public String getUser() {
return "root";
}
public String getPassword() {
return "codeup";
}
}
15 changes: 15 additions & 0 deletions src/main/java/com/codeup/adlister/dao/Config.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.codeup.adlister.dao;

class Config {
public String getUrl() {
return "jdbc:mysql://localhost/adlister_db?serverTimezone=UTC&useSSL=false";
}

public String getUser() {
return "root";
}

public String getPassword() {
return "codeup";
}
}
5 changes: 5 additions & 0 deletions target/adlister-1.0-SNAPSHOT/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Manifest-Version: 1.0
Created-By: IntelliJ IDEA
Built-By: bama
Build-Jdk: 11.0.9

24 changes: 24 additions & 0 deletions target/adlister-1.0-SNAPSHOT/WEB-INF/ads/create.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<jsp:include page="/WEB-INF/partials/head.jsp">
<jsp:param name="title" value="Create a new Ad" />
</jsp:include>
</head>
<body>
<div class="container">
<h1>Create a new Ad</h1>
<form action="/ads/create" method="post">
<div class="form-group">
<label for="title">Title</label>
<input id="title" name="title" class="form-control" type="text">
</div>
<div class="form-group">
<label for="description">Description</label>
<textarea id="description" name="description" class="form-control" type="text"></textarea>
</div>
<input type="submit" class="btn btn-block btn-primary">
</form>
</div>
</body>
</html>
24 changes: 24 additions & 0 deletions target/adlister-1.0-SNAPSHOT/WEB-INF/ads/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<jsp:include page="/WEB-INF/partials/head.jsp">
<jsp:param name="title" value="Viewing All The Ads" />
</jsp:include>
</head>
<body>
<jsp:include page="/WEB-INF/partials/navbar.jsp" />

<div class="container">
<h1>Here Are all the ads!</h1>

<c:forEach var="ad" items="${ads}">
<div class="col-md-6">
<h2><c:out value="${ad.title}"/></h2>
<p><c:out value="${ad.description}"/></p>
</div>
</c:forEach>
</div>

</body>
</html>
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.
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.
25 changes: 25 additions & 0 deletions target/adlister-1.0-SNAPSHOT/WEB-INF/login.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<jsp:include page="/WEB-INF/partials/head.jsp">
<jsp:param name="title" value="Please Log In" />
</jsp:include>
</head>
<body>
<jsp:include page="/WEB-INF/partials/navbar.jsp" />
<div class="container">
<h1>Please Log In</h1>
<form action="/login" method="POST">
<div class="form-group">
<label for="username">Username</label>
<input id="username" name="username" class="form-control" type="text">
</div>
<div class="form-group">
<label for="password">Password</label>
<input id="password" name="password" class="form-control" type="password">
</div>
<input type="submit" class="btn btn-primary btn-block" value="Log In">
</form>
</div>
</body>
</html>
2 changes: 2 additions & 0 deletions target/adlister-1.0-SNAPSHOT/WEB-INF/partials/head.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<title>${param.title}</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
20 changes: 20 additions & 0 deletions target/adlister-1.0-SNAPSHOT/WEB-INF/partials/navbar.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand" href="/ads">Adlister</a>
</div>
<ul class="nav navbar-nav navbar-right">
<form action="/search">
<label>
<input name="term" type="text" placeholder="search term">
</label>
<button>Search</button>
</form>
<li><a href="/login">Login</a></li>
<li><a href="/logout">Logout</a></li>
</ul>

</div><!-- /.navbar-collapse -->
<!-- /.container-fluid -->
</nav>
16 changes: 16 additions & 0 deletions target/adlister-1.0-SNAPSHOT/WEB-INF/profile.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<jsp:include page="/WEB-INF/partials/head.jsp">
<jsp:param name="title" value="Your Profile" />
</jsp:include>
</head>
<body>
<jsp:include page="/WEB-INF/partials/navbar.jsp" />

<div class="container">
<h1>Welcome, ${sessionScope.user.username}!</h1>
</div>

</body>
</html>
33 changes: 33 additions & 0 deletions target/adlister-1.0-SNAPSHOT/WEB-INF/register.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<jsp:include page="partials/head.jsp">
<jsp:param name="title" value="Register For Our Site!" />
</jsp:include>
</head>
<body>
<jsp:include page="partials/navbar.jsp" />
<div class="container">
<h1>Please fill in your information.</h1>
<form action="/register" method="post">
<div class="form-group">
<label for="username">Username</label>
<input id="username" name="username" class="form-control" type="text">
</div>
<div class="form-group">
<label for="email">Email</label>
<input id="email" name="email" class="form-control" type="text">
</div>
<div class="form-group">
<label for="password">Password</label>
<input id="password" name="password" class="form-control" type="password">
</div>
<div class="form-group">
<label for="confirm_password">Confirm Password</label>
<input id="confirm_password" name="confirm_password" class="form-control" type="password">
</div>
<input type="submit" class="btn btn-primary btn-block">
</form>
</div>
</body>
</html>
15 changes: 15 additions & 0 deletions target/adlister-1.0-SNAPSHOT/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<jsp:include page="/WEB-INF/partials/head.jsp">
<jsp:param name="title" value="Welcome to my site!" />
</jsp:include>
</head>
<body>
<jsp:include page="/WEB-INF/partials/navbar.jsp" />
<div class="container">
<h1>Welcome to the Adlister!</h1>
</div>
</body>
</html>
Binary file added target/classes/Config.class
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 target/classes/com/codeup/adlister/dao/Ads.class
Binary file not shown.
Binary file added target/classes/com/codeup/adlister/dao/Config.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added target/classes/com/codeup/adlister/dao/Users.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.