Technical data

8 Configuring WebLogic Server Web Components
8-24 Administration Guide
Listing 8-1 Java Class for Creating a Custom ELF Field
import weblogic.servlet.logging.CustomELFLogger;
import weblogic.servlet.logging.FormatStringBuffer;
import weblogic.servlet.logging.HttpAccountingInfo;
/* This example outputs the User-Agent field into a
custom field called MyCustomField
*/
public class MyCustomField implements CustomELFLogger{
public void logField(HttpAccountingInfo metrics,
FormatStringBuffer buff) {
buff.appendValueOrDash(metrics.getHeader("User-Agent"));
}
}
}
Preventing POST Denial-of-Service Attacks
A Denial-of-Service attack is a malicious attempt to overload a server with phony
requests. One common type of attack is to send huge amounts of data in an HTTP
POST
method. You can set three attributes in WebLogic Server that help prevent this type of
attack. These attributes are set in the console, under Servers or virtual hosts. If you
define these attributes for a virtual host, the values set for the virtual host override
those set under Servers.
PostTimeoutSecs
You can limit the amount of time that WebLogic Server waits between
receiving chunks of data in an HTTP POST.
MaxPostTimeSecs
Limits the total amount of time that WebLogic Server spends receiving post
data. If this limit is triggered, a
PostTimeoutException is thrown and the
following message is sent to the server log:
Post time exceeded MaxPostTimeSecs.