I included commons-logging.jar in my classpath, imported Log and LogFactory in my class and have the following:
public final class ExecuteQueryForm extends ActionForm { private static Log log = LogFactory.getLog(ExecuteQueryForm.class); public void setSQLQuery(String query) { log.debug("test");
try{
this.SQLQuery = query;
}
catch(NumberFormatException nfe){
ActionErrors errors = new ActionErrors();
errors.add("password", new ActionError("error.password.required"));
}
} .... ....
Now, is this suppose to write test in my /export/home/$TOMCAT/bin/Catalina.out file or somewhere else?
When I referenced commons-logging.jar in my classpath do I user log4j by default?
Do I need to perform any other configurations to user logging in my applications?
While I am here, the errors that I send in try/catch block is this the correct way to do it, because as of this implentation ActionForm does not seem to catch NumberFormatException (I use SQLQuery as a number for now...)
thanks, Alex