struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Lehrian <>
Subject Help with enabling Struts logging
Date Tue, 16 Jul 2002 20:19:55 GMT

Please forgive what I believe to be a newbie question.  I tried RTFM and 
the RTFMLA (mailing list archives).  I dunno, maybe my brain isn't 
functioning at the moment.  Anyway.  I have a simple Tomcat 4.0.4 
installation with Struts 1.1b1.  I haven't done anything to the logging 
configuration.  I would like the lines:

	if (log.isDebugEnabled()) {...

to return true and the for results of the lines:


to get print to System.out.

I can't for the life of me figure out how to enable debugging for 
Struts.  Please HELP!


     protected ActionForm processActionForm(HttpServletRequest request,
                                            HttpServletResponse response,
                                            ActionMapping mapping) {

         // Create (if necessary a form bean to use
         ActionForm instance = RequestUtils.createActionForm
             (request, mapping, appConfig, servlet);
         if (instance == null) {
             return (null);

         // Store the new instance in the appropriate scope
         if (log.isDebugEnabled()) {
             log.debug(" Storing ActionForm bean instance in scope '" +
                 mapping.getScope() + "' under attribute key '" +
                 mapping.getAttribute() + "'");
         if ("request".equals(mapping.getScope())) {
             request.setAttribute(mapping.getAttribute(), instance);
         } else {
             HttpSession session = request.getSession();
             session.setAttribute(mapping.getAttribute(), instance);
         return (instance);


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message