@WebServlet(name="serveFiles",
urlPatterns="/file/*")
public class FileServingServlet
extends VitroHttpServlet
Handles a request to serve an uploaded file from the file storage system.
The path of the request should be the "alias URL" of the desired file. We need to:
If the request is superficially correct, but no such file can be found, return a 404. If there is a break in the data structures within the model or the file system, return a 500.
VitroHttpServlet.PickListSorterHTML_MIMETYPE, JSON_LD_MIMETYPE, JSON_MIMETYPE, N3_MIMETYPE, publicDateFormat, RDFXML_MIMETYPE, TTL_MIMETYPE, XHTML_MIMETYPE| Constructor and Description |
|---|
FileServingServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest rawRequest,
javax.servlet.http.HttpServletResponse response)
doGet does nothing.
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
A POST request is treated the same as a GET request.
|
void |
init()
Get a reference to the File Storage system.
|
dumpRequestParameters, isAuthorizedToDisplayPage, maximumMultipartFileSize, redirectToInsufficientAuthorizationPage, redirectToLoginPage, redirectUnauthorizedRequest, service, sortForPickList, stashFileSizeExceptiondoDelete, doHead, doOptions, doPut, doTrace, getLastModified, servicepublic void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void doGet(javax.servlet.http.HttpServletRequest rawRequest,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
VitroHttpServletdoGet in class VitroHttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
doPost in class VitroHttpServletjavax.servlet.ServletExceptionIOExceptionCopyright © 2021. All rights reserved.