07-14-2009 08:43 PM
public void execute(WebScriptRequest webscriptRequest, WebScriptResponse webscriptResponse) throws IOException {
String xmlResponse = null;
xmlResponse = Utiles.ejemploMetodoEnOtraClase();
webscriptResponse.getWriter().write(xmlResponse);
}
07-15-2009 03:28 AM
07-15-2009 03:53 AM
07-15-2009 08:09 AM
public class AlfrescoAppContext {
private static ApplicationContext ctx;
/**
* Injected from the class "ApplicationContextProvider" which is automatically
* loaded during Spring-Initialization.
*/
public static void setApplicationContext(ApplicationContext applicationContext) {
ctx = applicationContext;
}
/**
* Get access to the Spring ApplicationContext from everywhere in your Application.
*
* @return
*/
public static ApplicationContext getApplicationContext() {
return ctx;
}
}
public class AlfrescoAppContextProvider implements ApplicationContextAware {
public void setApplicationContext(ApplicationContext ctx) throws BeansException {
// Wiring the ApplicationContext into a static method
AlfrescoAppContext.setApplicationContext(ctx);
}
}
<bean id="alfrescoApplicationContextProvider" class="<aqui el paquete de la clase>.AlfrescoAppContextProvider" />
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.