Package digilib.servlet
Class Texter
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- digilib.servlet.Texter
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
@WebServlet(name="Texter", urlPatterns={"/Texter/*","/servlet/Texter/*"}) public class Texter extends javax.servlet.http.HttpServlet
Servlet for displaying text- Author:
- casties
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
accountlog
logger for accounting requestsprotected AuthzOps
authzOp
AuthOps instanceprotected String
defaultDir
default text directoryprotected DocuDirCache
dirCache
DocuDirCache instanceprotected DigilibServletConfiguration
dlConfig
DigilibConfiguration instanceprotected FileOps
fileOp
FileOps instanceprotected org.slf4j.Logger
logger
general loggerstatic String
tlVersion
Servlet versionprotected boolean
useAuthorization
use authentication
-
Constructor Summary
Constructors Constructor Description Texter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected TextFile
getTextFile(DigilibServletRequest dlRequest, String subDirectory)
Looks for a file in the given subDirectory.void
init(javax.servlet.ServletConfig config)
protected void
processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Field Detail
-
tlVersion
public static String tlVersion
Servlet version
-
dlConfig
protected DigilibServletConfiguration dlConfig
DigilibConfiguration instance
-
logger
protected org.slf4j.Logger logger
general logger
-
accountlog
protected static org.slf4j.Logger accountlog
logger for accounting requests
-
fileOp
protected FileOps fileOp
FileOps instance
-
authzOp
protected AuthzOps authzOp
AuthOps instance
-
dirCache
protected DocuDirCache dirCache
DocuDirCache instance
-
useAuthorization
protected boolean useAuthorization
use authentication
-
defaultDir
protected String defaultDir
default text directory
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
- Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
processRequest
protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
getTextFile
protected TextFile getTextFile(DigilibServletRequest dlRequest, String subDirectory)
Looks for a file in the given subDirectory.- Parameters:
dlRequest
- The received request which has the file path.subDirectory
- The subDirectory of the file path where the file should be found.- Returns:
- The wanted Textfile or null if there wasn't a file.
-
-