Hi Stephan,
Thanks for help.
But i am using cocoon 2.0 version. So i do't have enable-uploads tag in my web.xml file.
So according to wikki  document on cocoon 2.0 i followed that document steps.
i thibk  this enable-upload tag was in 2.1 version. so let me the further steps pls.
so how can i proceed it? pls help me?
 
Regards
bajji

Stephan Coboos <[EMAIL PROTECTED]> wrote:
bajji m wrote:

>Hi everybody,
>
>I am getting into some issues in File uploading part using cocoon framework.
>
>I made changes to web.xml file like this:
>---------------------------------------------------------
>
> upload-directory
> E:\upfiles
>

>
>
> autosave-uploads
> false
>

>
>
>
> overwrite-uploads
> rename
>

>
>
> upload-max-size
> 10000000
>

>So when i submit a request from html with form elemens the selected file was successfully uploaded to my uploaded dir. But i am trying to catch FilePartFile object in XSP from request object. But here i am getting null value for FilePartFile object.
>
>My xsp looks like this:
>-------------------------------
>
>> xmlns:xsp="http://apache.org/xsp">
> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
>
>
> java.io.File
> java.util.Enumeration
> java.util.Collections
> java.util.Map
> org.apache.cocoon.environment.*
> org.apache.cocoon.components.request.multipart.*
>

>
>
> //Request request = ObjectModelHelper.getRequest(objectModel);
> System.out.println("1"+request);
> System.out.println("1"+request.get("uploadfile"));
> FilePartFile filePart = (FilePartFile) request.get("uploadfile");
> System.out.println("2");
> File file = ((FilePartFile)filePart).getFile();
> System.out.println("3");
> stem.out.println("3"+filePart.getFilePath());
> System.out.println("file name: "+file.getCanonicalPath());
>
> File...uploaded
>

>

>

>
>I am unable to catch FilePartFile object from request object.
>Pls help me. pls let me know where i am doing wrong.
>
>Thanks
>Joshua
>
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>
>

Hello,

1.) Did you set enable-uploads to true in web.xml?
2.) To receive an PartOnDisk-Object you have to set "autosave-upload" to
true in web.xml. Else you will get an object of type PartInMemory.
3.) Why do you use FilePartFile? What is it? Use (Part), PartOnDisk or
PartInMemory instead.
4.) Did you set a form with attributes enctype and action like this?

...

5.) Have you seen the wiki docs about this subject?
http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithCocoon2.1

Hope, this helps.

Regards
Stephan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

Reply via email to