You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Crine <cr...@4dconcept.fr> on 2003/05/26 17:55:52 UTC

Upload Action

I'm using the upload Action from Wiki site but i encounter some trouble :


In the class :
...
public class UploadTest
   extends AbstractLogEnabled
   implements Action, ThreadSafe
{
     public Map act(Redirector redirector, SourceResolver resolver,
                    Map objectModel, String source, Parameters par)
         throws Exception
     {
         Request request = ObjectModelHelper.getRequest(objectModel);
         FilePart filePart = (FilePart) request.get("uploaded_file");

         File file = ((FilePartFile)filePart).getFile(); ---> Here I have a 
NullPointerException.
         getLogger().debug("Uploaded file = " + file.getCanonicalPath());
         return null;
     }
}

Why does i have a NullPointerException ?

Lionel 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org