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 StringcreateFileUrl(javax.servlet.http.HttpServletRequest request, File f)Create file url with codeprotected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles the HTTPGETmethod.protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles the HTTPPOSTmethod.StringgetServletInfo()Returns a short description of the servlet.voidinit(javax.servlet.ServletConfig config)static voidmain(String[] args)Helper to create coded gettersprotected voidprocessRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Processes requests for both HTTPGETandPOSTmethods.-
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:
initin interfacejavax.servlet.Servlet- Overrides:
initin classGetServiceFileServlet- Throws:
javax.servlet.ServletException
-
processRequest
protected void processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException, UnsupportedEncodingExceptionProcesses requests for both HTTPGETandPOSTmethods.- Overrides:
processRequestin 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, IOExceptionHandles the HTTPGETmethod.- Overrides:
doGetin 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, IOExceptionHandles the HTTPPOSTmethod.- Overrides:
doPostin 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:
getServletInfoin interfacejavax.servlet.Servlet- Overrides:
getServletInfoin 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:
createFileUrlin classGetServiceFileServlet
-
-