----- 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 -
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
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.