[ 
https://issues.apache.org/jira/browse/TOBAGO-1976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752532#comment-16752532
 ] 

Hudson commented on TOBAGO-1976:
--------------------------------

SUCCESS: Integrated in Jenkins build Tobago 2.x #1530 (See 
[https://builds.apache.org/job/Tobago%202.x/1530/])
TOBAGO-1976: Backport to 2.x: Using Servlet 3.0 for uploading files with 
(lofwyr: rev 45469686ea6e7dcbb2489cd30fa3fbdaad71c166)
* (edit) tobago-theme/tobago-theme-charlotteville/pom.xml
* (add) 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/HttpPartWrapper.java
* (edit) 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
* (edit) tobago-extension/tobago-deprecation/pom.xml
* (edit) 
tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Upload.java
* (add) 
tobago-core/src/test/java/org/apache/myfaces/tobago/internal/util/PartUtilsUnitTest.java
* (edit) tobago-example/tobago-example-addressbook-cdi/pom.xml
* (edit) tobago-tool/tobago-tool-apt/pom.xml
* (edit) 
tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/UploadItem.java
* (edit) tobago-example/tobago-example-security/pom.xml
* (edit) tobago-example/tobago-example-blank/src/main/webapp/WEB-INF/web.xml
* (edit) 
tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
* (edit) 
tobago-example/tobago-example-addressbook/src/main/webapp/WEB-INF/web.xml
* (edit) 
tobago-example/tobago-example-addressbook-cdi/src/main/java/org/apache/myfaces/tobago/example/addressbook/Picture.java
* (edit) tobago-example/tobago-example-sandbox/src/main/webapp/WEB-INF/web.xml
* (edit) tobago-tool/tobago-theme-plugin/pom.xml
* (edit) 
tobago-core/src/main/java/org/apache/myfaces/tobago/validator/FileItemValidator.java
* (edit) tobago-extension/tobago-sandbox/pom.xml
* (edit) tobago-example/tobago-example-assembly/pom.xml
* (edit) tobago-tool/tobago-tool-annotation/pom.xml
* (edit) tobago-example/tobago-example-demo/pom.xml
* (edit) tobago-theme/tobago-theme-example/pom.xml
* (edit) tobago-tool/pom.xml
* (edit) 
tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Picture.java
* (edit) tobago-assembly/pom.xml
* (edit) tobago-example/tobago-example-data/pom.xml
* (edit) tobago-extension/tobago-fileupload/pom.xml
* (edit) 
tobago-extension/tobago-fileupload/src/main/java/org/apache/myfaces/tobago/fileupload/FileUploadFacesContextFactoryImpl.java
* (delete) 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/webapp/TobagoMultipartFormdataRequest.java
* (add) 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/PartUtils.java
* (edit) 
tobago-example/tobago-example-demo/src/main/webapp/content/40-upload/upload.xhtml
* (edit) tobago-theme/tobago-theme-scarborough/pom.xml
* (edit) tobago-extension/pom.xml
* (edit) tobago-theme/tobago-theme-speyside/pom.xml
* (edit) 
tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java
* (edit) tobago-theme/tobago-theme-standard/pom.xml
* (edit) tobago-extension/tobago-security/pom.xml
* (edit) pom.xml
* (edit) 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java
* (edit) tobago-example/tobago-example-test/pom.xml
* (edit) tobago-example/pom.xml
* (edit) tobago-example/tobago-example-addressbook/pom.xml
* (edit) tobago-example/tobago-example-sandbox/pom.xml
* (edit) tobago-example/tobago-example-blank/pom.xml
* (edit) tobago-example/tobago-example-portlet/pom.xml
* (edit) 
tobago-example/tobago-example-addressbook-cdi/src/main/webapp/WEB-INF/web.xml
* (edit) tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
* (edit) tobago-theme/tobago-theme-richmond/pom.xml
* (edit) 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
* (edit) tobago-example/tobago-example-security/src/main/webapp/WEB-INF/web.xml
* (edit) 
tobago-example/tobago-example-addressbook-cdi/src/main/java/org/apache/myfaces/tobago/example/addressbook/web/Controller.java
* (edit) 
tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FileRenderer.java
* (delete) 
tobago-core/src/test/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequestUnitTest.java
* (edit) tobago-theme/pom.xml
* (edit) tobago-core/pom.xml
* (edit) 
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileDropTagDeclaration.java
* (edit) tobago-example/tobago-example-test/src/main/webapp/WEB-INF/web.xml


> Backport to 2.x: Using Servlet 3.0 for uploading files with <tc:file>
> ---------------------------------------------------------------------
>
>                 Key: TOBAGO-1976
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-1976
>             Project: MyFaces Tobago
>          Issue Type: New Feature
>          Components: Core, Demo, Themes
>            Reporter: Udo Schnurpfeil
>            Assignee: Udo Schnurpfeil
>            Priority: Major
>             Fix For: 2.4.0
>
>
> Changes regarding to Tobago 2.x:
>   * You no long need to define a TobagoMultipartFormdataFilter in the web.xml
>   * There is no longer a tobago-fileupload.jar
>   * Remove the dependency to commons-fileupload.jar in your web app, if there 
> is any.
> Usage:
>   * If using JSF 2.0 or 2.1 (not for 2.2. and higher) you will need to add a 
> tag <multipart-config> Tag to the FacesServlet config in the web.xml
> {code}
>   <servlet>
>     <servlet-name>FacesServlet</servlet-name>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>     <multipart-config>
>       <location>/tmp</location>
>       <max-file-size>20848820</max-file-size>
>       <max-request-size>418018841</max-request-size>
>       <file-size-threshold>1048576</file-size-threshold>
>     </multipart-config>
>   </servlet>
> {code}
>   * The type of value of the <tc:file> has been changed from 
> *org.apache.commons.fileupload.FileItem* to *javax.servlet.http.Part*.
>   * To access from the Java bean see this example:
> {code}
>   private Part file1; // + getter and setter
>    
>   public String upload() {
>     InputStream is = part.getInputStream();
>     ...
>   } 
> {code}
>   * Is using Servlet API 3.1 you may call *part.getSubmittedFileName()*, for 
> 3.0 you may use the Utility 
> *org.apache.myfaces.tobago.internal.util.PartUtils.getSubmittedFileName(part)*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to