public class I2PSnarkServlet extends BasicServlet
BasicServlet.HttpContent
Modifier and Type | Field and Description |
---|---|
static String |
PROP_CONFIG_FILE |
_context, _log, _resourceBase
Constructor and Description |
---|
I2PSnarkServlet() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Handle what we can here, calling super.doGet() for the rest.
|
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Handle what we can here, calling super.doPost() for the rest.
|
File |
getResource(String pathInContext)
We override this to set the file relative to the storage dirctory
for the torrent.
|
void |
init(ServletConfig cfg) |
(package private) String |
toIcon(String path)
Pick an icon; try to catch the common types in an i2p environment
Pkg private for FileTypeSorter.
|
(package private) static String |
urlify(String s)
This is for a full URL.
|
addMimeMapping, addPaths, decodePath, doDelete, doOptions, doTrace, encodePath, getContent, getMimeType, loadMimeMap, passConditionalHeaders, sendData, setResourceBase, setWarBase, writeHeaders
doHead, doPut, getLastModified, service, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public static final String PROP_CONFIG_FILE
public void init(ServletConfig cfg) throws ServletException
init
in interface Servlet
init
in class BasicServlet
ServletException
public void destroy()
destroy
in interface Servlet
destroy
in class GenericServlet
public File getResource(String pathInContext)
getResource
in class BasicServlet
pathInContext
- should always start with /public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet
in class BasicServlet
ServletException
IOException
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
in class BasicServlet
ServletException
IOException
static String urlify(String s)