This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<!-- Include a stylesheet called stylesheet.css . --> | |
<link href="stylesheet.css" rel="stylesheet" title="Normal" /> | |
<title>The title of the page.</title> | |
</head> | |
<body> | |
<!-- The page's content goes here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import javax.servlet.RequestDispatcher; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
/* The relative URL that this servlet will be handling. For instance, if we are running | |
Tomcat locally with an Eclipse project called "SomeProject", then by specifying "/Main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Boilerplate. --> | |
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" | |
xmlns:c="http://java.sun.com/jsp/jstl/core" | |
version="2.0"> | |
<jsp:directive.page | |
language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" /> | |
<jsp:text><![CDATA[<!doctype html>]]></jsp:text> | |
<html> | |
<head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Applies to the entire body of the HTML document (except where overridden by more specific | |
selectors). */ | |
body { | |
margin: 25px; | |
background-color: rgb(240,240,240); | |
font-family: arial, sans-serif; | |
font-size: 14px; | |
} | |
/* Applies to all <h1>...</h1> elements. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- To submit form data back to the same page (and thus the same Servlet), use "#" for the | |
action. Otherwise specify a relative URL to a different page for the action. --> | |
<form action="#"> | |
<label for="ageField" >Your age: </label> | |
<input type="text" name="ageParam" id="ageField" /><br/> | |
<label for="colorField">Favorite color:</label> | |
<input type="text" name="colorParam" id="colorField"/><br/> | |
<input type="submit" value="Click me to submit!"/> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Not like this: --> | |
<iframe width="560" height="349" src="http://www.youtube.com/embed/FaMTedT6P0I" /> | |
<!-- Nor like this (JSP will just convert it to use a self-closing tag as above): --> | |
<iframe width="560" height="349" src="http://www.youtube.com/embed/FaMTedT6P0I"></iframe> | |
<!-- But like this (tell JSP to output the elements exactly like we wrote them): --> | |
<![CDATA[ | |
<iframe width="560" height="349" src="http://www.youtube.com/embed/FaMTedT6P0I"></iframe> | |
]]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.meetproj.model; | |
import java.io.File; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.SQLException; | |
import java.sql.Statement; | |
import java.util.List; | |
public class VideoDatabase { | |
public static List<Video> loadVideos() throws SQLException { | |
throw new UnsupportedOperationException("TODO: Implement when instructed."); | |
} | |
public static void insertVideo(Video v) throws SQLException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
public final class DatabaseConnector { | |
private static DatabaseConnector instance; | |
private static String useMySQL = null; | |
// Deployment note: Replace with a real server name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a 2013-02-19 20:50:11.000000000 -0500 | |
+++ b 2013-02-19 20:50:04.000000000 -0500 | |
@@ -1 +1 @@ | |
-Angela teaches a FOB the pinky-swear. | |
+Samples teaches a FOB the pinky-swear. |
OlderNewer