public class DSpaceServlet
extends javax.servlet.http.HttpServlet
Unlike regular servlets, DSpace servlets should override the
doDSGet and doDSPost methods, which provide a
DSpace context to work with, and handle the common exceptions
SQLException and AuthorizeException.
doGet and doPost should be overridden only in
special circumstances.
Note that if all goes well, the context object passed in to
doDSGet and doDSPut must be completed
after a JSP has been displayed, but before the
method returns. If an error occurs (an exception is thrown, or the context is
not completed) the context is aborted after doDSGet or
doDSPut return.
Context,
Serialized Form| Constructor and Description |
|---|
DSpaceServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDSGet(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process an incoming HTTP GET.
|
protected void |
doDSPost(Context context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process an incoming HTTP POST.
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceprotected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doDSGet(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException, java.sql.SQLException, AuthorizeException
context - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP responsejava.sql.SQLException - if a database error occursAuthorizeException - if some authorization error occursjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doDSPost(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException, java.sql.SQLException, AuthorizeException
context - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP responsejava.sql.SQLException - if a database error occursAuthorizeException - if some authorization error occursjavax.servlet.ServletExceptionjava.io.IOExceptionCopyright © 2018 DuraSpace. All Rights Reserved.