views:

519

answers:

1

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?

+1  A: 

Need to set the property uploadDirectory on the component, as such:

<ice:inputFile file="#{Bean.file}" uploadDirectory="./upload/#{Bean.userInitials}/"/>

This property is (currently) not mentioned in the JavaDoc for this component on the ICEFaces site.

KG