I've noticed that the ice:inputFile component will only upload files to the directory $TOMCAT_HOME/webapps/MyAppName/upload/. I want this directory to be dependent on the user initials for the current user (i.e. user with initials abc wants to upload a file, the file goes to $TOMCAT_HOME/webapps/MyAppName/upload/abc/). How can I dynamically set this attribute?
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- PrimeFaces block UI does not work when the compone
- primefaces orderlist not getting updated with the
- JSF2 composite cc.attrs expression does not evalua
相关文章
- How to allow numbers only using f:validateRegex
- JSF 2.0: ajax request when press ENTER
- Formatting a double in JSF
- f:convertNumber on Double: ClassCastException
- SeamPhaseListener - Could not start transaction -
- How do I access EJB bean when inside a custom Conv
- Getting value from dynamically created inputText
- JSF 2.0 javascript onload/oncomplete
Need to set the property uploadDirectory on the component, as such:
This property is (currently) not mentioned in the JavaDoc for this component on the ICEFaces site.
As indicated in the reference guide http://www.icefaces.org/docs/v1_8_2/htmlguide/devguide/references5.html
web.xml file:
To specify the directory location where uploaded files are stored, the following parameter is used:
This parameter works in conjunction with the ice:inputFile component attribute "uniqueFolder" with four possible combinations as illustrated below:
Note: The default upload directory specified via the configuration parameters above can be overridden on a per-instance basis via the uploadDirectory and uploadDirectoryAbsolute attributes on the ice:inputFile component.
Hope this helps!