Return-Path: Delivered-To: apmail-myfaces-commits-archive@www.apache.org Received: (qmail 6726 invoked from network); 22 Oct 2009 12:55:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Oct 2009 12:55:51 -0000 Received: (qmail 24895 invoked by uid 500); 22 Oct 2009 12:55:51 -0000 Delivered-To: apmail-myfaces-commits-archive@myfaces.apache.org Received: (qmail 24787 invoked by uid 500); 22 Oct 2009 12:55:51 -0000 Mailing-List: contact commits-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list commits@myfaces.apache.org Received: (qmail 24778 invoked by uid 99); 22 Oct 2009 12:55:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 12:55:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 12:55:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B10A723888FE; Thu, 22 Oct 2009 12:55:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r828675 - in /myfaces/tobago/trunk/example/demo/src/main: java/org/apache/myfaces/tobago/example/reference/Upload.java webapp/WEB-INF/faces-config.xml webapp/reference/upload.jsp Date: Thu, 22 Oct 2009 12:55:20 -0000 To: commits@myfaces.apache.org From: lofwyr@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091022125520.B10A723888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: lofwyr Date: Thu Oct 22 12:55:20 2009 New Revision: 828675 URL: http://svn.apache.org/viewvc?rev=828675&view=rev Log: upload example Added: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/reference/Upload.java Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml myfaces/tobago/trunk/example/demo/src/main/webapp/reference/upload.jsp Added: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/reference/Upload.java URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/reference/Upload.java?rev=828675&view=auto ============================================================================== --- myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/reference/Upload.java (added) +++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/reference/Upload.java Thu Oct 22 12:55:20 2009 @@ -0,0 +1,44 @@ +package org.apache.myfaces.tobago.example.reference; + +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class Upload { + + private static final Log LOG = LogFactory.getLog(Upload.class); + + private FileItem file; + + public String upload() { + LOG.info("type=" + file.getContentType()); + LOG.info("file=" + file.get().length); + LOG.info("name=" + file.getName()); + return null; + } + + public FileItem getFile() { + return file; + } + + public void setFile(FileItem file) { + this.file = file; + } +} Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml?rev=828675&r1=828674&r2=828675&view=diff ============================================================================== --- myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml (original) +++ myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/faces-config.xml Thu Oct 22 12:55:20 2009 @@ -339,6 +339,12 @@ request + + upload + org.apache.myfaces.tobago.example.reference.Upload + session + + reference/intro Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/upload.jsp URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/upload.jsp?rev=828675&r1=828674&r2=828675&view=diff ============================================================================== --- myfaces/tobago/trunk/example/demo/src/main/webapp/reference/upload.jsp (original) +++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/upload.jsp Thu Oct 22 12:55:20 2009 @@ -26,8 +26,9 @@ <%-- code-sniplet-start id="file" --%> - + <%-- code-sniplet-end id="file" --%> +