Spring

How to print current ClassLoader with or without Spring

Now we explain how to print a class loader associated to current thread. We can use Spring, and with one row of code, we solve the problem! We use the ClassLoaderUtils class.
For example:

System.out.println(
org.springframework.util.ClassLoaderUtils
    .showClassLoaderHierarchy(
Thread.currentThread().getContextClassLoader()));

If we don’t want to have any library dependency

How to build a breadcrumb with Spring Webflow 1.0.4

In this tutorial we explain how to create a simple breadcrumb with the new Spring Webflow framework, arrived at 1.0.4 version, released the 26 June 2007.
The first step is creating a class that implements FlowExecutionListener, a WebFlow framework library:
public class BreadcrumbListener implements FlowExecutionListener { }
Then, you can override one of the next two methods defined […]

How to load states attributes of a flow in Spring Webflow

Now you can read a mini tutorial on Spring Webflow. How to load a state attribute from a flow definition.
From the requestContext (of RequestContext class) we can load, for example, the current state.
StateDefinition currentState = requestContext.getCurrentState();
Now we can load an attribute, for example “caption”, defined in the following piece of xml flow definition file