com.mentata.sg8
Class delete
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.mentata.sg8.SG8Servlet
com.mentata.sg8.delete
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- public class delete
- extends SG8Servlet
A servlet for deleting existing entries from 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. Otherwise, for a GET request a corresponding SG8Discovery bean is constructed and passed through the session to the confirm JSP. For a POST request, typically from the confirm JSP, the identified entry is deleted and its data is returned to the user as an LDIF file.
- Since:
- 0.7
- Author:
- Jon Roberts
- See Also:
- Serialized Form
| 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 |
delete
public delete()
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException
- Forwards the request to the confirm JSP.
- Overrides:
doGet in class SG8Servlet
- Parameters:
req - the servlet requestres - the servlet response
- Throws:
ServletException - if the request is inappropriate
IOException
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException
- Performs deletion and returns an LDIF representation of the deleted entry.
- Overrides:
doPost in class SG8Servlet
- Parameters:
req - the servlet requestres - the servlet response
- Throws:
ServletException - if the request is inappropriate or deletion fails
IOException