Simple Configuration

One goal of WTFIGO is to keep configuration as simple as possible. It wouldn't be very helpful if you had to spend a lot of time troubleshooting your WTFIGO configuration in order to track down your real problem.

The only configuration required is to install the filter and filter-mapping in your web.xml file. Additionally, adding the WtfigoListener will allow WTFIGO to capture more startup information and provide additional diagnostic information.

					
<filter>
	<filter-name>WtfigoFilter</filter-name>
	<filter-class>org.wtfigo.WtfigoFilter</filter-class>
</filter>
<filter-mapping>
	<filter-name>WtfigoFilter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
	<listener-class>org.wtfigo.WtfigoListener</listener-class>
</listener>
				
The JSP tags do not require either the Filter or Listener to be installed.

One further option for Tomcat servers is to put this configuration information in the $CATALINA_HOME/conf/web.xml file that is shared by all web applications. This allows you to have WTFIGO configured without needing to modify your application's web.xml file. You still need to include the wtfigo.jar file in your WEB-INF/lib directory, it cannot be installed in common/lib or shared/lib. Also, the wtfigo.jar file needs to be in every application's WEB-INF/lib directory, including the manager and admin applications if they are installed.

Logging

WTFIGO requires either log4j or Java1.4 logging to be configured in order to capture application event messages. Log4j can be installed as part of your web application (put the jar in your WEB-INF/lib directory) or as part of your container. The preferred method is to configure Log4j as your container logging. For Tomcat, you need to do the following:

  1. Install commons-logging.jar in TOMCAT_HOME/common/lib
  2. Install log4j.jar in TOMCAT_HOME/common/lib
  3. Create a log4.properties file in TOMCAT_HOME/common/classes
If you use log4j, make sure that you only have one log4j Jar file in your classpath. If it is installed in common/lib, do not put it in your WEB-INF/lib directory.

Advanced Configuration

There are two ways to control WTFIGO through configuration parameters. These properties can be passed in to the WtfigoFilter as init-params or put in a wtfigo.properties file located in your classpath or your web root directory.

Property Values Description
enableFilter true/false Sets whether the WTFIGO filter should be on by default. The filter can always be disabled by adding filterControl=off or filterControl=stop to any request. It may be useful to set this to false and then to turn it on when you want to use the filter.
enableRedirect true/false Sets whether the WTFIGO filter intercept redirect responses and show an interstitial page. The interstitial page allows you to inspect page diagnostic information before proceeding to the redirect URL.