if (bean != null) {
final WebContinuation kont =
(WebContinuation) ((Environment) resolver).getAttribute("kont");
// Hack? I use JXPath to determine the properties of the bean object
final JXPathBeanInfo bi = JXPathIntrospector.getBeanInfo(bean.getClass());
DynamicPropertyHandler h = null;
final PropertyDescriptor[] props;
if (bi.isDynamic()) {
Class cl = bi.getDynamicPropertyHandlerClass();
try {
h = (DynamicPropertyHandler) cl.newInstance();
} catch (Exception exc) {
exc.printStackTrace();
h = null;
}
props = null;
} else {
h = null;
props = bi.getPropertyDescriptors();
}
final DynamicPropertyHandler handler = h;
this.velocityContext = new Context() {
public Object put(String key, Object value) {