public class FileServlet
extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
protected static long |
cnt |
protected static java.lang.String |
documentRoot |
protected static long |
expires |
protected static java.util.Map<java.lang.String,java.lang.String> |
roots |
protected static java.util.Map<java.lang.String,java.lang.String> |
virtualRoots |
Constructor and Description |
---|
FileServlet() |
Modifier and Type | Method and Description |
---|---|
static void |
addVirtualRoot(java.lang.String id,
java.lang.String root) |
static com.groiss.cache.FileCacheItem |
findFile(java.util.Locale l,
java.lang.String root,
java.lang.String path) |
static com.groiss.cache.FileCacheItem |
findFile(java.util.Locale l,
java.lang.String root,
java.lang.String path,
java.lang.String starts)
lookup a file in the locale dependent file tree
|
static java.lang.String |
getMappedImage(java.lang.String imagePath)
Returns the shiny path for the passed image path.
|
static long |
getRequestCount() |
static java.lang.String |
getVirtualRoot(java.lang.String id) |
static java.lang.String |
getVirtualRoot(java.lang.String vroot,
java.lang.String loc) |
static void |
logParameters(javax.servlet.http.HttpServletRequest req,
org.slf4j.Logger aLogger) |
static javax.servlet.http.HttpServletRequest |
logRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
org.slf4j.Logger aLogger) |
static void |
logRequestProcessed(long startTime,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
protected static final java.util.Map<java.lang.String,java.lang.String> virtualRoots
protected static final java.util.Map<java.lang.String,java.lang.String> roots
protected static java.lang.String documentRoot
protected static long cnt
protected static long expires
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, javax.servlet.ServletException
service
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
public static java.lang.String getVirtualRoot(java.lang.String id)
public static long getRequestCount()
public static java.lang.String getVirtualRoot(java.lang.String vroot, java.lang.String loc)
public static void addVirtualRoot(java.lang.String id, java.lang.String root)
public static com.groiss.cache.FileCacheItem findFile(java.util.Locale l, java.lang.String root, java.lang.String path) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static com.groiss.cache.FileCacheItem findFile(java.util.Locale l, java.lang.String root, java.lang.String path, java.lang.String starts) throws java.io.FileNotFoundException, java.io.IOException
l
- the locale, can be null for locale independent filesroot
- the root of searchpath
- the relative path of the resourcestarts
- the id of the application, needed for finding the resource to make the language
substitutionsjava.io.FileNotFoundException
java.io.IOException
public static void logParameters(javax.servlet.http.HttpServletRequest req, org.slf4j.Logger aLogger)
public static javax.servlet.http.HttpServletRequest logRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.slf4j.Logger aLogger)
public static void logRequestProcessed(long startTime, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
public static java.lang.String getMappedImage(java.lang.String imagePath)
imagePath
- the original path of the image@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.