jp.terasoluna.fw.web.thin
Class EvidenceLogFilter

java.lang.Object
  extended by jp.terasoluna.fw.web.thin.EvidenceLogFilter
All Implemented Interfaces:
javax.servlet.Filter

public class EvidenceLogFilter
extends java.lang.Object
implements javax.servlet.Filter

Performs the output process of evidence log.

Evidence log outputs the log of request parameter information.

How to use
To use this function, perform the following settings in deployment descriptor (web.xml).

 <filter>
   <filter-name>evidenceLogFilter</filter-name>
   <filter-class>
     jp.terasoluna.fw.web.thin.EvidenceLogFilter
   </filter-class>
 </filter>

 <filter-mapping>
   <filter-name>evidenceLogFilter</filter-name>
   <url-pattern>/*</url-pattern>
 </filter-mapping>
 


Field Summary
static java.lang.String EVIDENCELOG_THRU_KEY
          Key of request attribute which indicates that the request has passed through filter.
private static org.apache.commons.logging.Log log
          Log class
 
Constructor Summary
EvidenceLogFilter()
           
 
Method Summary
 void destroy()
          It is called at the time of filter processing.
Processing is not performed in this class.
 void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)
          Outputs evidence log.
private  void evidenceLog(java.lang.String s)
          Outputs evidence log.
 void init(javax.servlet.FilterConfig config)
          This method is called by the container when the filter changes to Service start state. After creating an instance of the filter, container calls init method only once.
In order to request the filter to execute the filter process, init method should finish normally. Container cannot change the Filter to service state when the init method is any of the following.
ServletException is thrown or It does not get recovered within the time defined by container.
*Processsing is not performed in this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVIDENCELOG_THRU_KEY

public static final java.lang.String EVIDENCELOG_THRU_KEY
Key of "Request" attribute which indicates that the request has passed through filter.

See Also:
Constant Field Values

log

private static org.apache.commons.logging.Log log
Log class

Constructor Detail

EvidenceLogFilter

public EvidenceLogFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException
This method is called by the container when the filter changes to Service start state. After creating an instance of the filter, container calls init method only once.
In order to request the filter to execute the filter process, init method should finish normally. Container cannot change the Filter to service state when the init method is any of the following.

*Processing is not performed in this class.

Specified by:
init in interface javax.servlet.Filter
Parameters:
config - FilterConfig instance.
Throws:
javax.servlet.ServletException - Exception which is thrown at the time of abnormal initialization.
See Also:
Filter.init(javax.servlet.FilterConfig)

doFilter

public void doFilter(javax.servlet.ServletRequest req,
                     javax.servlet.ServletResponse res,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Outputs the evidence log.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
req - HTTP request
res - HTTP response
chain - Filter chain
Throws:
java.io.IOException - I/O error
javax.servlet.ServletException - Servlet exception
See Also:
Filter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)

evidenceLog

private void evidenceLog(java.lang.String s)
Outputs evidence log.

Parameters:
s - String which is output to log.

destroy

public void destroy()
It is called at the time of filter processing.
Processing is not performed in this class.

Specified by:
destroy in interface javax.servlet.Filter
See Also:
Filter.destroy()