com.mentata.sg8
Class update

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.mentata.sg8.SG8Servlet
              extended bycom.mentata.sg8.update
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class update
extends SG8Servlet

A servlet for updating attribute values for existing entries in the database. If the request does not name a context and object, the servlet will throw an exception. If the session does not contain an authenticated connection to the given context the path is stored in the session and the request is forwarded to the authenticate JSP. If the input does not define an identifier, an SG8Search bean is constructed and passed through the session to the search JSP. If an entry is identified but no changes are submitted, an SG8Change bean is constructed and passed through the session to the modify JSP. Otherwise changes received from an update form are processed from the request and each affected attribute is updated. The results are packed into the SG8Change bean and sent to the recover JSP.

Since:
0.7
Author:
Jon Roberts
See Also:
Serialized Form

Constructor Summary
update()
           
 
Method Summary
 void doGet(HttpServletRequest req, HttpServletResponse res)
          Forwards the request to the modify JSP.
 void doPost(HttpServletRequest req, HttpServletResponse res)
          Performs attribute modification and forwards the results to the recover JSP.
 
Methods inherited from class com.mentata.sg8.SG8Servlet
getClassName, getContext, getPath
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

update

public update()
Method Detail

doGet

public void doGet(HttpServletRequest req,
                  HttpServletResponse res)
           throws ServletException,
                  IOException
Forwards the request to the modify JSP.

Overrides:
doGet in class SG8Servlet
Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException - if the request is inappropriate
IOException

doPost

public void doPost(HttpServletRequest req,
                   HttpServletResponse res)
            throws ServletException,
                   IOException
Performs attribute modification and forwards the results to the recover JSP.

Overrides:
doPost in class SG8Servlet
Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException - if the request is inappropriate or the update fails
IOException