[jboss-cvs] JBossAS SVN: r58265 - trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/jasper

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Nov 11 13:12:45 EST 2006


Author: scott.stark at jboss.org
Date: 2006-11-11 13:12:43 -0500 (Sat, 11 Nov 2006)
New Revision: 58265

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/jasper/JspServletOptions.java
Log:
Add the displaySourceFragment option

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/jasper/JspServletOptions.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/jasper/JspServletOptions.java	2006-11-11 18:02:00 UTC (rev 58264)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/jasper/JspServletOptions.java	2006-11-11 18:12:43 UTC (rev 58265)
@@ -53,6 +53,12 @@
    private boolean development = true;
 
    /**
+    * Should we include a source fragment in exception messages, which could be displayed
+    * to the developer ?
+    */
+   private boolean displaySourceFragment = true;
+
+   /**
     * Should Ant fork its java compiles of JSP pages.
     */
    public boolean fork = true;
@@ -277,6 +283,12 @@
       return development;
    }
 
+   public boolean getDisplaySourceFragment()
+   {
+      // TODO Auto-generated method stub
+      return displaySourceFragment;
+   }
+
    /**
     * Is the generation of SMAP info for JSR45 debuggin suppressed?
     */
@@ -595,6 +607,23 @@
          }
       }
 
+      String displaySourceFragment = config.getInitParameter("displaySourceFragment"); 
+      if (displaySourceFragment != null)
+      {
+          if (displaySourceFragment.equalsIgnoreCase("true"))
+          {
+              this.displaySourceFragment = true;
+          }
+          else if (displaySourceFragment.equalsIgnoreCase("false"))
+          {
+              this.displaySourceFragment = false;
+          }
+          else
+          {
+              log.warn(Localizer.getMessage("jsp.warning.displaySourceFragment"));
+          }
+      }
+
       String suppressSmap = config.getInitParameter("suppressSmap");
       if (suppressSmap != null)
       {




More information about the jboss-cvs-commits mailing list