public class HTMLServlet extends DSpaceServlet
If we receive a request like this:
http://dspace.foo.edu/html/123.456/789/foo/bar/index.html
we first check for a bitstream with the *exact* filename
foo/bar/index.html. Otherwise, we strip the path information
(up to three levels deep to prevent infinite URL spaces occurring) and see if
we have a bitstream with the filename index.html (with no
path). If this exists, it is served up. This is because if an end user
uploads a composite HTML document with the submit UI, we will not have
accurate path information, and so we assume that if the browser is requesting
foo/bar/index.html but we only have index.html, that this is the desired file
but we lost the path information on upload.
| Constructor and Description |
|---|
HTMLServlet()
Create an HTML Servlet
|
| 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.
|
doGet, doPostdoDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceprotected void doDSPost(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, SQLException, AuthorizeException
DSpaceServletdoDSPost in class DSpaceServletcontext - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP responseSQLException - if a database error occursAuthorizeException - if some authorization error occursjavax.servlet.ServletExceptionIOExceptionprotected void doDSGet(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, SQLException, AuthorizeException
DSpaceServletdoDSGet in class DSpaceServletcontext - a DSpace Context objectrequest - the HTTP requestresponse - the HTTP responseSQLException - if a database error occursAuthorizeException - if some authorization error occursjavax.servlet.ServletExceptionIOExceptionCopyright © 2016 DuraSpace. All Rights Reserved.