edu.pdx.cs399J.servlets
Class MovieDatabaseServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by edu.pdx.cs399J.servlets.MovieDatabaseServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class MovieDatabaseServlet
extends HttpServlet

A servlet that provides REST access to a movie database

See Also:
Serialized Form

Constructor Summary
MovieDatabaseServlet()
           
 
Method Summary
protected  void doDelete(HttpServletRequest request, HttpServletResponse response)
          Removes information from the database
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
          Searches for information in the database
protected  void doPost(HttpServletRequest request, HttpServletResponse response)
          Creates information in the database
protected  void doPut(HttpServletRequest request, HttpServletResponse response)
          Updates information in the database
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MovieDatabaseServlet

public MovieDatabaseServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

doPut

protected void doPut(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Updates information in the database

Overrides:
doPut in class HttpServlet
Parameters:
request - The request from the client. Note that unlike POST, data arrives in the body (conent) of the request. {#link getParameter} returns null
Throws:
ServletException
IOException

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Searches for information in the database

Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

protected void doPost(HttpServletRequest request,
                      HttpServletResponse response)
               throws ServletException,
                      IOException
Creates information in the database

Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

doDelete

protected void doDelete(HttpServletRequest request,
                        HttpServletResponse response)
                 throws ServletException,
                        IOException
Removes information from the database

Overrides:
doDelete in class HttpServlet
Throws:
ServletException
IOException


Copyright © 2000-2009 Portland State University. All Rights Reserved.