2014-02-26 16:59 GMT+01:00 Thomas Hermann <therm...@mtg.de>: > Do you simply mean: > > ------------------------------------------------- > DefaultActionValidatorManager validator = new > DefaultActionValidatorManager(); > validator.setFileManagerFactory(new DefaultFileManagerFactory()); > validator.validate(request, null); > -------------------------------------------------- > ? > > The DefaultFileManagerFactory is not instantiated properly. I get the > following exception now: > > --------------------------------------------------- > java.lang.NullPointerException > at > com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory.lookupFileManager(DefaultFileManagerFactory.java:57) > at > com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory.getFileManager(DefaultFileManagerFactory.java:41) > at > com.opensymphony.xwork2.validator.DefaultActionValidatorManager.setFileManagerFactory(DefaultActionValidatorManager.java:73) > ---------------------------------------------------
The last thing left: new DefaultFileManager() > Isn't there an easy way to initialize the DefaultActionValidatorManager > properly? It is, use dependency injection :-) Can you describe why do you want to create DefaultActionValidatorManager manually instead using DI? Regards -- Ćukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org