Implementation of a Filter that logs interesting contents from the specified Request (before processing) and the corresponding Response (after processing). It is especially useful in debugging problems related to headers and cookies.
When using this Filter, it is strongly recommended that the
org.apache.catalina.filter.RequestDumperFilter logger is directed to a dedicated file and that the
org.apache.juli.VerbatimFormatter is used.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private transient Log | |
| private static final String | |
| private static final String | |
| private static final long | |
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | doFilter(ServletRequest
The servlet request to be processed request, ServletResponse The servlet response to be created response, FilterChain The filter chain being processed chain)Implements jakarta. Log the interesting request parameters, invoke the next Filter in the sequence, and log the interesting response parameters. |
| private void | |
| private String | |
| private void |
| log | back to summary |
|---|---|
| private transient Log log | |
| NON_HTTP_REQ_MSG | back to summary |
|---|---|
| private static final String NON_HTTP_REQ_MSG | |
| NON_HTTP_RES_MSG | back to summary |
|---|---|
| private static final String NON_HTTP_RES_MSG | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| timestamp | back to summary |
|---|---|
| private static final ThreadLocal<RequestDumperFilter. | |
| RequestDumperFilter | back to summary |
|---|---|
| public RequestDumperFilter() | |
| doFilter | back to summary |
|---|---|
| public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException Implements jakarta. Log the interesting request parameters, invoke the next Filter in the sequence, and log the interesting response parameters.
| |
| doLog | back to summary |
|---|---|
| private void doLog(String attribute, String value) | |
| getTimestamp | back to summary |
|---|---|
| private String getTimestamp() | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException | |
| Modifier and Type | Field and Description |
|---|---|
| private final Date | |
| private String | |
| private final SimpleDateFormat |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void |
| date | back to summary |
|---|---|
| private final Date date | |
| dateString | back to summary |
|---|---|
| private String dateString | |
| format | back to summary |
|---|---|
| private final SimpleDateFormat format | |
| Timestamp | back to summary |
|---|---|
| private Timestamp() | |
| update | back to summary |
|---|---|
| private void update() | |