You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple CF sample application that we cloned from cloudfoundry-sticky-session and tweaked to provide a sample for the logging and instrumentation features.
Currently configured to use log4j2 as the logging implementation.
It uses a environment variable RANDOM_SLEEP which, when set to true will introduce a artificial delay (up to 1 sec).
Running it locally
You can use the following Maven target to run the application locally
Here's a table of "interesting" request URLs you may want to load:
URL
Comment
/
Handled by standard servlet. Prints all environment variables, HTTP request headers and a random "greeting" message.
/<n>
Like the one above, but also computes the <n>th Fibonacci number. Computation happens recursively, so you can use higher values for n to get long response times or even crash the application
/stacktrace
Handled by standard servlet. Generates a 500 response and prints a stack trace
/jersey?greeting=<msg>
Handled by Jersey container. Will print the line Hello from Jersey: <msg>
/jersey/forward
Handled by Jersey container. Will use a Jersey client to "forward" to default servlet.
/jersey/forward?q=<n>
Again handled by Jersey container and forwarded to default servlet as /<n>.