aspose file tools*
The moose likes Portals and Portlets and the fly likes Upload file option in jboss portal ( JSF) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Upload file option in jboss portal ( JSF) " Watch "Upload file option in jboss portal ( JSF) " New topic
Author

Upload file option in jboss portal ( JSF)

rashmi shivanna
Greenhorn

Joined: Aug 19, 2009
Posts: 15
Hi All,
I want to add the fileupload in the idenity portlet . but after adding the enctype="multipart/form-data" form is not getting submited , do you have any idea why it is not working . here is the code .


I have configured the extension filter in the web.xml
<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
<description>Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.

Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<!--
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/temp</param-value>
<description>Set the path where the intermediary files will be
stored.
</description>
</init-param>
-->
</filter>

<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>




form is properly encoded and add the t:inputFileUpload

<h:form enctype="multipart/form-data" id="myForm" name="myForm">

<t:inputFileUpload
id="myUploadedFile"
storage="file" accept="image/*"
styleClass="myStyle"
value="#{myBackingBean.myUploadedFile}"/>

</h:form>


UploadedFile instance variable and setter/getter to backing bean

import org.apache.myfaces.custom.fileupload.UploadedFile;

public class MyBackingBean {

private UploadedFile myUploadedFile;

public UploadedFile getMyUploadedFile() {
return myUploadedFile;
}

public void setMyUploadedFile(UploadedFile myUploadedFile) {
this.myUploadedFile = myUploadedFile;
}

}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Upload file option in jboss portal ( JSF)
 
Similar Threads
Upload more than 1 MB
t:inputCalendar in JSF having probelms with Tomahawk1.1.3
TOMAHAWK t:inputCalendar java script problem popup
Javascript error when upgrading to tomahawk 1.1.3
Myfaces component is not rendered properly