public abstract class AbstractContentServlet
extends javax.servlet.http.HttpServlet
| Constructor and Description |
|---|
AbstractContentServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected abstract String |
getContent(javax.servlet.http.HttpServletRequest request) |
protected abstract String |
getContentType() |
protected String |
getFileContents(File f) |
void |
init(javax.servlet.ServletConfig config) |
protected String |
resolveContent(File f,
String path) |
protected File |
resolveFile(File cwd,
String relativePath) |
protected File |
resolveRelativeFileFromUri(javax.servlet.http.HttpServletRequest request) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected File resolveFile(File cwd, String relativePath) throws IOException
IOExceptionprotected String getFileContents(File f) throws IOException
IOExceptionprotected abstract String getContentType()
protected abstract String getContent(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected File resolveRelativeFileFromUri(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, IOException
javax.servlet.ServletExceptionIOExceptionprotected String resolveContent(File f, String path) throws IOException
IOExceptionpublic void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
doGet in class javax.servlet.http.HttpServletIOExceptionjavax.servlet.ServletExceptionCopyright © 2016. All rights reserved.