I am learning struts 2 recently,when I tested one converter example from Max's struts 2 series,I encountered some errors:
ERROR [XWorkConverter] Problem loading properties for tutorial.HelloWorldConvert
java.lang.ClassNotFoundException: tutorial.LocaleConverter ....
There are tow ways to configure register the converter in struts 2, global way and local way. This problem happened when I tested the second one, putting the configure properties file with the action class together. the below is the content of the converter configure file.
HelloWorldConvert-conversion.properties:
# syntax: <propertyName> = <converterClassName>
loc = tutorial.LocaleConverter
Cause: Perhaps, it's one issue of struts 2. The error is caused by one space in the end of configure line. struts didn't trim the blanks in the tail when extracting the configured converter name.
Solution: After I remove the spaces in the end of tutorial.LocaleConverter, it works successfully.