Skip to content

Instantly share code, notes, and snippets.

@eirikbakke
eirikbakke / gist:1056066
Created June 30, 2011 11:42
Basic structure of a Servlet.
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"
@eirikbakke
eirikbakke / gist:1056064
Created June 30, 2011 11:40
Basic structure of an HTML file.
<!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. -->