|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.web.action.AbstractWebAction
kr.co.hit.live.web.download.FileDispatcherWebAction
public abstract class FileDispatcherWebAction
FileDispatcher 기능을 WebAction으로 제공하는 기본 클래스이다.
| Field Summary | |
|---|---|
static String |
DEFAULT_CONTENT_TYPE
|
static String |
DEFAULT_ENCODING
|
| Fields inherited from class kr.co.hit.live.web.action.AbstractWebAction |
|---|
context, logger |
| Constructor Summary | |
|---|---|
protected |
FileDispatcherWebAction()
|
| Method Summary | |
|---|---|
protected abstract void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
실제 파일을 데이터를 내려주는 메소드이다. |
WebActionForward |
execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
파일을 내려주는 WebAction 인터페이스의 execute() 메소드의 구현이다. |
String |
getContentType(String path)
파일경로를 주면 확장자를 찾아서 contentsType을 반환한다. |
protected FileDispatcher |
getDispatcher()
|
String |
getEncoding()
|
String |
getErrorPage()
파일을 찾을 수 없을 경우에 뿌려줄 에러 페이지의 경로를 반환한다. |
protected String |
getExtention(String path)
path에 존재하는 확장자를 리턴한다. |
protected void |
initContentTypes()
확장자별 contents type을 매핑한다. |
protected boolean |
isModifiedSince(javax.servlet.http.HttpServletRequest request,
File file)
HTTP Request 헤더에 "If-Modified-Since" 항목이 있을 경우 출력할 파일의 수정일시를 사용하여 변경여부를 반환한다. |
void |
setContentType(String contentString)
확장자와 컨텐츠타입 매핑을 추가한다. |
void |
setEncoding(String encoding)
|
void |
setErrorPage(String path)
파일을 찾을 수 없을 경우에 뿌려줄 에러 페이지의 경로를 설정한다. |
void |
setNoCache(boolean b)
|
void |
showConfiguration(javax.servlet.http.HttpServletResponse response)
WebAction의 설정값을 출력하는 메소드이다. |
protected void |
writeHeader(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean lastModified)
HTTP Header 쓰기. |
| Methods inherited from class kr.co.hit.live.web.action.AbstractWebAction |
|---|
createForward, getServletContext, getWebApplicationContext, setForward, setPrefix, setSuffix, setWebApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_ENCODING
public static final String DEFAULT_CONTENT_TYPE
| Constructor Detail |
|---|
protected FileDispatcherWebAction()
| Method Detail |
|---|
protected abstract void dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
request - response -
IOExceptionprotected FileDispatcher getDispatcher()
public void setEncoding(String encoding)
public String getEncoding()
public void setNoCache(boolean b)
public void setErrorPage(String path)
path - public String getErrorPage()
protected void writeHeader(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean lastModified)
request - response -
protected boolean isModifiedSince(javax.servlet.http.HttpServletRequest request,
File file)
request - file -
public WebActionForward execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
execute in interface WebActionexecute in class AbstractWebActionExceptionpublic void setContentType(String contentString)
extension - contentsType - public String getContentType(String path)
fileExtension -
protected void initContentTypes()
protected String getExtention(String path)
path -
public void showConfiguration(javax.servlet.http.HttpServletResponse response)
throws IOException
WebAction
showConfiguration in interface WebActionshowConfiguration in class AbstractWebActionIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||