Class Nav
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--Nav
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class Nav
- extends javax.servlet.http.HttpServlet
Creates and displays the navigation bar. Uses a SQLRequest to query the database for the
images to include in the drop-down list
- See Also:
- Serialized Form
Constructor Summary |
Nav()
|
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles requests using the 'get' method by passing to the 'post' method handler. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles requests using the 'post' method. |
void |
init(javax.servlet.ServletConfig config)
Initialize the Servlet |
void |
printError(java.io.PrintWriter out)
Generates the HTML to display a message informing the user that an error occurred while
accessing the database |
void |
printMessage(java.io.PrintWriter out)
Generates the HTML to display a message informing the user that they need to login
before accessing the application |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Nav
public Nav()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Initialize the Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Parameters:
config
- the configuration parameters- Throws:
javax.servlet.ServletException
- a Servlet error occurred
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Handles requests using the 'get' method by passing to the 'post' method handler.
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the HttpRequestresponse
- the HttpResponse- Throws:
java.io.IOException
- an I/O error occurredjavax.servlet.ServletException
- a Servlet error occurred
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Handles requests using the 'post' method. Creates the HTML output for the navigation bar.
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the HttpRequestresponse
- the HttpResponse- Throws:
java.io.IOException
- an I/O error occurredjavax.servlet.ServletException
- a Servlet error occurred
printMessage
public void printMessage(java.io.PrintWriter out)
- Generates the HTML to display a message informing the user that they need to login
before accessing the application
- Parameters:
out
- the PrintWriter to display the output
printError
public void printError(java.io.PrintWriter out)
- Generates the HTML to display a message informing the user that an error occurred while
accessing the database
- Parameters:
out
- the PrintWriter to display the output