This is an exrcise to learn how to include files
css.file
body {
font-family: Arial, Helvetica, sans-serif;
}
section {
width: 450px;
margin: 0 auto;
padding: 20px 20px;
background: white;
border: 2px solid navy;
}
h1 {
color: navy;
}
label {
width: 10em;
padding-right: 1em;
float: left;
}
input[type=”text”] { /* An attribute selector */
float: left;
width: 15em;
margin-bottom: .5em;
}
input[type=”submit”] { /* An attribute selector */
float: left;
margin-bottom: .5em;
}
br {
clear: left;
}
.error {
color: red;
font-weight: bold;
}
footer.jsp
<section>
© 2014, Mike Murach and Associates
</section>
</body>
</html>
header.jsp
e>Murach’s Java Servlets and JSP</title>
<link rel=”stylesheet” href=”styles/main.css”>
</head>
<body>
index.html
<%@page contentType=”text/html” pageEncoding=”utf-8″%>
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″>
<title>Murach’s Java Servlets and JSP</title>
<link rel=”stylesheet” href=”styles/main.css”>
</head>
<body>
<section>
<h1>Future Value Calculator</h1>
<p><i>${message}</i></p>
<form action=”calculate” method=”post”>
<label>Investment Amount:</label>
<input type=”text” name=”investment”
value=”${calculation.monthlyInvestmentAmount}”/><br>
<label>Yearly Interest Rate:</label>
<input type=”text” name=”interest_rate”
value=”${calculation.yearlyInterestRate}”/><br>
<label>Number of Years:</label>
<input type=”text” name=”years”
value=”${calculation.years}”/><br>
<label> </label>
<input type=”submit” value=”Calculate”/><br>
</form>
</section>
result.jsp
v<%@page contentType=”text/html”pageEncoding=”utf-8″%>
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″>
<title>Murach’s Java Servlets and JSP</title>
<link rel=”stylesheet” href=”styles/main.css”>
</head>
<body>
<section>
<h1>Future Value
PayPal Gateway not configured
PayPal Gateway not configured