OK, first, I'm going to be pedantic.
Althouh apparently some IDEs will define
JSF backing beans with names like "xxxController", JSF backing beans are
not Controllers. They are
Models.
You almost never create your own Controllers in JSF as they are pre-defined as part of JSF itself.
Now for your real problem. JSF uses
JEE Expression Language to access (read OR write) properties of the backing beans. In many cases the same property may be read to display a control's value then written when the control's updated value is saved. That's the diffference between the "#" expression introducer commonly used by JSF and the "$" expression introducer used on JSPs. The "$" can only read, not write.
More importantly, that means that you access the property by the
property name and not by the
accessor method name, since either the "get" or "set" method could be required.
In short:
(Again, MainController isn't actually a Controller). When you coded #{mainController.getFile}, what JSF actually tried to invoke was the mainController bean's "getGetFile()" method, which, of course isn't what you wanted. JSF does not display errors if you get your names wrong, unfortunately, it just silently ignores the problem. There's a reason for that, I think. but I've never seen it formally stated.