|
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 -----
From: Chandra Sekhar
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 -----
From: Rønnevik, Eivind
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() { public
void setUploadedFile(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?
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.
|

