Package nl.b3p.commons.services
Class GetServiceFileSecureServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- nl.b3p.commons.services.GetServiceFileServlet
-
- nl.b3p.commons.services.GetServiceFileSecureServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class GetServiceFileSecureServlet extends GetServiceFileServlet
Servlet for getting files secure from the host.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class nl.b3p.commons.services.GetServiceFileServlet
FILE
-
-
Constructor Summary
Constructors Constructor Description GetServiceFileSecureServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
createFileUrl(javax.servlet.http.HttpServletRequest request, File f)
Create file url with codeprotected void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handles the HTTPGET
method.protected void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handles the HTTPPOST
method.String
getServletInfo()
Returns a short description of the servlet.void
init(javax.servlet.ServletConfig config)
static void
main(String[] args)
Helper to create coded gettersprotected void
processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Processes requests for both HTTPGET
andPOST
methods.-
Methods inherited from class nl.b3p.commons.services.GetServiceFileServlet
getCorrectedFile, writeErrorMessage, writeFile, writeFileNotFoundMessage, writeFileToHtml
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classGetServiceFileServlet
- Throws:
javax.servlet.ServletException
-
processRequest
protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, UnsupportedEncodingException
Processes requests for both HTTPGET
andPOST
methods.- Overrides:
processRequest
in classGetServiceFileServlet
- Parameters:
request
- servlet requestresponse
- servlet response- Throws:
javax.servlet.ServletException
- if a servlet-specific error occursIOException
- if an I/O error occursUnsupportedEncodingException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
Handles the HTTPGET
method.- Overrides:
doGet
in classGetServiceFileServlet
- Parameters:
request
- servlet requestresponse
- servlet response- Throws:
javax.servlet.ServletException
- if a servlet-specific error occursIOException
- if an I/O error occurs
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
Handles the HTTPPOST
method.- Overrides:
doPost
in classGetServiceFileServlet
- Parameters:
request
- servlet requestresponse
- servlet response- Throws:
javax.servlet.ServletException
- if a servlet-specific error occursIOException
- if an I/O error occurs
-
getServletInfo
public String getServletInfo()
Returns a short description of the servlet.- Specified by:
getServletInfo
in interfacejavax.servlet.Servlet
- Overrides:
getServletInfo
in classGetServiceFileServlet
- Returns:
- a String containing servlet description
-
main
public static void main(String[] args) throws NoSuchAlgorithmException, UnsupportedEncodingException, IOException
Helper to create coded getters
-
createFileUrl
protected String createFileUrl(javax.servlet.http.HttpServletRequest request, File f)
Create file url with code- Overrides:
createFileUrl
in classGetServiceFileServlet
-
-