In my application, people can upload files. What is the best way to
configure the root of the location the files go to?
I thought I'd contribute to ApplicationDefaults like so:
public static void contributeApplicationDefaults(
MappedConfiguration<String, String> configuration)
{
configuration.add("tutor.file-system-root", "/Users/pbeshai/tmproot/");
configuration.add("tapestry.supported-locales", "en");
configuration.add("tapestry.start-page-name", "Login");
}
And hopefully be able to inject that value into components where
necessary. Is there a more advised way of doing this?
Unfortunately, I am unable to retrieve this value in my component
(from simple lack of know-how).
I thought it might be similar to
@Inject
@Value("${tutor.file-system-root}")
private String _fileSystemRoot;
public String getFileSystemRoot() { return _fileSystemRoot; }
But I've had no such luck.
Does anyone know the correct way to do this?
Thanks,
--
Peter Beshai
CS 134 Tutor
University of Waterloo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]