Dear Ronnevik,
 
   Ultimately we got it.  I'm very thankful for the detailed discussion on the myfaces input file Upload with uyou and the other members. I got some analysis from our discussions and the studies with my coleague .May be this will help in any sort of  File uploads.If any other steps to be taken, Please suggest..
 
Regards,
Chandru.
 
 
 
----- Original Message -----
To: uday
Sent: Tuesday, August 01, 2006 8:06 PM
Subject: Fw: Pleas e respond to my problem of file upload;

Hi ,
 
I hope U have got it. After the detailed Discussion from the myfaces groups. There are few things to be resolved.
 
1) Faces Servlet in the web.xml in the Extensions Filter.
2) The Extensions filter class mostly is not the case for our problem.
3)If we can upgrade to Tomahawk it is better. I have a perfect example with the web.xml and TOmahawk jars and I even did it with the Tomahawk. U can easily view the samples.which one time I have already sent u i'm again attaching it here.
4)enctype = multipart-formdata should be mentioned in the
<h:form id = "" enctype = "multipart-formdata">   and a multipart-form filter is to be used.This part is Clearly visible in the myfaces_ext_sf.tld in the myFacesExtensions.jar.
We have used Multipart form filter in the web.xml for this purpose mand its worked  finally.
 
 Please Check these 4 references.
 
Regards,
Chandru.
 
 
----- Original Message -----
Sent: Tuesday, August 01, 2006 7:49 PM
Subject: RE: Pleas e respond to my problem of file upload;

I can't see that your code in web.xml should cause any problems, but I've never used myfaces with .shtml .
 
This is how I defined a file Uploader 
 
------------ jsp --------------------------------------------------------------
 

<t:inputFileUpload id="fileUpload"

value="#{uploadDocumentBean.uploadedFile}" storage="file" styleClass="standard"

required="true" />

<h:commandButton value="#{messages.uploadUpload}" styleClass="button"

action="#{uploadDocumentBean.uploadFile}" />

-------------------- faces-config.xml-------------------------------------------- :

<managed-bean>

<managed-bean-name>uploadDocumentBean</managed-bean-name>

<managed-bean-class>

com.faces.handlers.document.UploadDocumentBean

</managed-bean-class>

<managed-bean-scope>session</managed-bean-scope>

</managed-bean>

 

-----------------UploadDocumentBean: ------------------

private UploadedFile uploadedFile;

public UploadedFile getUploadedFile() {
  return uploadedFile;
 }

 public void setUploadedFile(UploadedFile uploadedFile) {
  log.debug("uploaded file: " + uploadedFile.getName() + " size: " + uploadedFile.getSize() + " contentType: " + uploadedFile.getContentType());
  this.uploadedFile = uploadedFile;
 }

//Action method
 public String uploadFile()
 {
  log.debug("ID selected is: " + getVersionId());
  log.debug("uploaded file: " + uploadedFile.getName() + " size: " + uploadedFile.getSize() + " contentType: " + uploadedFile.getContentType());
   if(uploadedFile != null)
           return "uploadSuccess";
   
  return null;
 }

Is it the bean itself you cannot obtain, or is it the reference to the file you uploaded that is null?


- E -


From: Chandra Sekhar [mailto:[EMAIL PROTECTED]
Sent: 1. august 2006 15:35
To: MyFaces Discussion
Subject: Re: Pleas e respond to my problem of file upload;

Hi I am not getting some messages to my mail id. Ok I saw the messages with the Gmail Account.The reference in the Control Bean I'm not able toi obtain.
 
 
Is this part of Code any problem in the web.xml

<filter-mapping>

<filter-name>extensionsFilter</filter-name>

<url-pattern>*.shtml</url-pattern>

</filter-mapping>

 
Regds,
Chandru.
 
----- Original Message -----
Sent: Tuesday, August 01, 2006 6:12 PM
Subject: Re: Pleas e respond to my problem of file upload;

Hi,
 
I'm using the earlier version of this. In that I could not find the Extensions Filter in the Jar with this Filter Class
 
org.apache.myfaces.webapp.filter.ExtensionsFilter.
SOI cannot use this.
 
Regards,
Chandru.
----- Original Message -----
Sent: Tuesday, August 01, 2006 5:52 PM
Subject: RE: Pleas e respond to my problem of file upload;

What version of myfaces are you using?
 
If it's 1.1.3 the location/package of the extensions filter has changed, and your web.xml should be configured like this:
 

<filter>

<filter-name>extensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>

<init-param>

<param-name>uploadMaxFileSize</param-name>

<param-value>100m</param-value>

</init-param>

<init-param>

<param-name>uploadThresholdSize</param-name>

<param-value>100k</param-value>

</init-param>

</filter>

Regards,

 

Eivind



From: Chandra Sekhar [mailto:[EMAIL PROTECTED]
Sent: 1. august 2006 13:59
To: MyFaces Discussion
Subject: Pleas e respond to my problem of file upload;

I'm attaching the file Upload bean,facesConfig.xml and web.xml please help me out of this issue.I'm getting a null pointer Exception.Please help me out of this.
 
Regds,
Chandru.

Reply via email to