|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.codelabor.system.file.web.servlet.FileUploadServlet
public class FileUploadServlet
파일 업로드 서블릿
Nested Class Summary | |
---|---|
static class |
FileUploadServlet.Parameter
파라미터 |
Field Summary | |
---|---|
protected String |
characterEncoding
캐릭터 인코딩기본 값은 UTF-8이다. |
protected long |
fileSizeMax
파일 당 최대 파일 크기기본 값은 10MB이다. |
protected String |
forwardPathDelete
파일 삭제 후, 포워드 경로 |
protected String |
forwardPathDownload
다운로드 후, 포워드 경로 |
protected String |
forwardPathList
목록 조회 후, 포워드 경로 |
protected String |
forwardPathRead
파일 읽기 후, 포워드 경로 |
protected String |
forwardPathUpload
업로드 후, 포워드 경로 |
protected String |
parameterName
파라미터명 |
protected String |
realRepositoryPath
파일 저장 경로기본 값은 시스템 환경 변수 user.dir가 가리키는 경로다. |
protected RepositoryType |
repositoryType
파일 저장 방식기본 값은 FILE_SYSTEM이다. |
protected long |
requestSizeMax
한 요청 당 최대 파일 크기기본 값은 100MB이다. |
protected javax.servlet.ServletConfig |
servletConfig
서블릿 컨피그 |
protected int |
sizeThreshold
메모리 파일 크기 한계치 |
protected String |
tempRepositoryPath
임시 파일 저장 경로기본 값은 시스템 환경 변수 java.io.tempdir이 가리키는 경로다. |
Constructor Summary | |
---|---|
FileUploadServlet()
|
Method Summary | |
---|---|
protected void |
delete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
파일을 삭제한다. |
void |
destroy()
|
protected void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String path)
페이지를 전환한다. |
protected void |
download(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
파일을 다운로드 한다. |
javax.servlet.ServletConfig |
getServletConfig()
|
String |
getServletInfo()
|
protected String |
getUniqueFilename()
고유 파일명을 가져온다. |
void |
init(javax.servlet.ServletConfig config)
|
protected void |
list(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
파일 목록을 가져온다. |
protected void |
processParameters(Map<String,Object> paramMap)
파라미터를 처리한다. |
protected void |
read(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
파일 정보를 가져온다. |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
upload(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
파일을 업로드 한다. |
protected void |
view(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
파일을 렌더링한다. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletContext, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.servlet.ServletConfig servletConfig
protected String parameterName
protected String forwardPathUpload
protected String forwardPathDownload
protected String forwardPathList
protected String forwardPathRead
protected String forwardPathDelete
protected String characterEncoding
protected int sizeThreshold
protected long fileSizeMax
protected long requestSizeMax
protected String realRepositoryPath
protected String tempRepositoryPath
protected RepositoryType repositoryType
Constructor Detail |
---|
public FileUploadServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void processParameters(Map<String,Object> paramMap) throws Exception
paramMap
- 파라미터 Map
Exception
- 예외protected void dispatch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String path) throws Exception
request
- 요청response
- 응답path
- 경로
Exception
- 예외protected void upload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
request
- 요청response
- 응답
Exception
- 예외protected String getUniqueFilename() throws Exception
Exception
- 예외protected void list(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
request
- 요청response
- 응답
Exception
- 예외protected void view(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
request
- 요청response
- 응답
Exception
- 예외protected void delete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
request
- 요청response
- 응답
Exception
- 예외protected void read(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
request
- 요청response
- 응답
Exception
- 예외public javax.servlet.ServletConfig getServletConfig()
getServletConfig
in interface javax.servlet.Servlet
getServletConfig
in class javax.servlet.GenericServlet
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
protected void download(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
request
- 요청response
- 응답
Exception
- 예외
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |