org.dspace.app.webui.servlet
Class DSpaceServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.dspace.app.webui.servlet.DSpaceServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- AbstractBrowserServlet, AdvancedSearchServlet, AuthorityChooseServlet, AuthorizeAdminServlet, BitstreamFormatRegistry, BitstreamServlet, CollectionWizardServlet, CommunityListServlet, ControlledVocabularySearchServlet, ControlledVocabularyServlet, DisplayStatisticsServlet, EditCommunitiesServlet, EditItemServlet, EditProfileServlet, EPersonAdminServlet, EPersonListServlet, FeedbackServlet, FeedServlet, GroupEditServlet, GroupListServlet, HandleServlet, HTMLServlet, ItemExportArchiveServlet, ItemMapServlet, LDAPServlet, LicenseEditServlet, LogoutServlet, MetadataExportServlet, MetadataFieldRegistryServlet, MetadataImportServlet, MetadataSchemaRegistryServlet, MyDSpaceServlet, NewsEditServlet, OpenSearchServlet, OpenURLServlet, PasswordServlet, RegisterServlet, RetrieveServlet, ShibbolethServlet, SimpleSearchServlet, SitemapServlet, StatisticsServlet, SubmissionController, SubscribeServlet, SuggestServlet, SuperviseServlet, ViewWorkspaceItemServlet, WorkflowAbortServlet, WorkspaceServlet, X509CertificateServlet
public class DSpaceServlet
- extends javax.servlet.http.HttpServlet
Base class for DSpace servlets. This manages the initialisation of a context,
if a context has not already been initialised by an authentication filter. It
also grabs the original request URL for later use.
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.
- Version:
- $Revision: 5845 $
- Author:
- Robert Tansley
- See Also:
Context,
Serialized Form
|
Method Summary |
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)
|
| 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 |
DSpaceServlet
public DSpaceServlet()
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
doDSGet
protected 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
- Process an incoming HTTP GET. If an exception is thrown, or for some
other reason the passed in context is not completed, it will be aborted
and any changes made by this method discarded when this method returns.
- Parameters:
context - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP response
- Throws:
java.sql.SQLException - if a database error occurs
AuthorizeException - if some authorization error occurs
javax.servlet.ServletException
java.io.IOException
doDSPost
protected 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
- Process an incoming HTTP POST. If an exception is thrown, or for some
other reason the passed in context is not completed, it will be aborted
and any changes made by this method discarded when this method returns.
- Parameters:
context - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP response
- Throws:
java.sql.SQLException - if a database error occurs
AuthorizeException - if some authorization error occurs
javax.servlet.ServletException
java.io.IOException
Copyright © 2010 DuraSpace. All Rights Reserved.