Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="${carbon.home}/repository/logs"
prefix="localhost_access_log_test."
suffix=".log"
pattern="%{Content-Type}o %{Content-Length}o %{Date}o %{Server}o"
resolveHosts="false"/>

The above will log Content-type, Content-Length, Date Date and Server headers of every response coming from AS, as follows:

...

Code Block
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="${carbon.home}/repository/logs"
prefix="localhost_access_log_test."
suffix=".log"
pattern="%r %q %h"
resolveHosts="false"/>

The above will log the First first line of the request (method and request URI), Query string (prepended with a '?' if it exists) and Remote hostname (or IP) of every request coming to AS as follows. (For more information on all possible values that can be given in the  pattern parameter, go to http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve)

...

Thereafter, when the POST request is sent together with the URL  encoded values  param1=value1  and  param2=value2:

Code Block
POST http://<IP>:<PORT>/example/servlets/servlet/RequestInfoExample

...