org.talika.tarsis.filters.upload
Class MultipartRequestFilter
java.lang.Object
org.talika.tarsis.filters.AbstractFilter
org.talika.tarsis.filters.upload.MultipartRequestFilter
- All Implemented Interfaces:
- javax.servlet.Filter
- public final class MultipartRequestFilter
- extends AbstractFilter
Multipart filter process client's multipart/form-data requests.
- Version:
- $Revision: 269 $
- Author:
- Jose M. Palomar
|
Method Summary |
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Process client's requests of type multipart/form-data. |
void |
init(javax.servlet.FilterConfig filterConfig)
Called by the web container to indicate to a filter that it is being placed
into service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultipartRequestFilter
public MultipartRequestFilter()
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Called by the web container to indicate to a filter that it is being placed
into service.
Initialization consits in:
- Calling super
int method.
- Initializing temporal directory.
- Specified by:
init in interface javax.servlet.Filter- Overrides:
init in class AbstractFilter
- Parameters:
filterConfig - FilterConfig filter configutarion.
- Throws:
javax.servlet.ServletException - if an exception has occurred that interferes with the
filter's normal operation- See Also:
Filter.init(FilterConfig)
doFilter
public void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws java.io.IOException,
javax.servlet.ServletException
- Process client's requests of type multipart/form-data.
Procesing consists in obtaining parameters and uploading files to temporal
directory.
When request is processed all obtained elements are encapsulated in a
MultipartRequestWrapper that is passed to next filter in
chain.
MultipartRequestWrapper makes multipart requests appears as a
normal request to the rest of elements in filter chain.
- Specified by:
doFilter in interface javax.servlet.Filter- Specified by:
doFilter in class AbstractFilter
- Parameters:
servletRequest - ServletRequest the ServletRequest object
that contains the client's request.servletResponse - ServletResponse the ServletResponse object
that contains the servlet's response.filterChain - FilterChain invocation chain of filtered request.
- Throws:
java.io.IOException - if an input or output exception occurs
javax.servlet.ServletException - if an exception has occurred that interferes with the
filter's normal operation- See Also:
Filter.doFilter(ServletRequest, ServletResponse, FilterChain)
Copyright © 2002-2005 Talika Open Source Group. All Rights Reserved.