org.apache.myfaces.tobago.webapp
Class TobagoMultipartFormdataFilter

java.lang.Object
  extended by org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter
All Implemented Interfaces:
Filter

public class TobagoMultipartFormdataFilter
extends java.lang.Object
implements Filter

This filter handles multipart request. It must be enabled in the web.xml of your web application. Usage:

 <filter>
 <filter-name>multipartFormdataFilter</filter-name>
 <filter-class>org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</filter-class>
 <init-param>
 <description>Set the size limit for uploaded files. Default value is 1 MB.
 Format: 10 = 10 bytes
 10k = 10 KB
 10m = 10 MB
 1g = 1 GB
 </description>
 <param-name>uploadMaxFileSize</param-name>
 <param-value>20m</param-value>
 </init-param>
 <init-param>
 <description>Set the upload repository path for uploaded files.
 Default value is java.io.tmpdir.</description>
 <param-name>uploadRepositoryPath</param-name>
 <param-value>/tmp</param-value>
 </init-param>
 </filter>
 <filter-mapping>
 <filter-name>multipartFormdataFilter</filter-name>
 <url-pattern>/faces/*</url-pattern>
 </filter-mapping>
 


Constructor Summary
TobagoMultipartFormdataFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 void init(FilterConfig filterConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TobagoMultipartFormdataFilter

public TobagoMultipartFormdataFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
          throws ServletException
Specified by:
init in interface Filter
Throws:
ServletException

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws java.io.IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
java.io.IOException
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Filter


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.