10-03-2011 05:28 AM
.jar file in <tomcat>/webapps/share/WEB-INF/lib or .class files in <Alfresco>/tomcat/webapps/alfresco/WEB-INF/classes/<class folder structure>
web-scripts-application-context.xml - <tomcat>/webapps/share/WEB-INF/classes/org/springframework/extensions/webscripts
simple.get.desc.xml - <tomcat>/webapps/share/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/demo
11-26-2011 11:01 AM
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN 2.0//EN' 'http://www.springframework.org/dtd/spring-beans-2.0.dtd'>
<beans>
<bean id="webscript.org.springframework.extensions.webscripts.simple.get" class="org.alfresco.module.demoscripts.SimpleWebScript" parent="webscript" />
</beans>
<webscript>
<shortname>The World's Simplest Webscript</shortname>
<description>Hands back a little bit of JSON</description>
<url>/demo/simple</url>
<authentication>none</authentication>
<format default="html"/>
</webscript>
<html>
<head>
<title>Hello World</title>
</head>
<body>
${hello}
</body>
</html>
package org.alfresco.module.demoscripts;
import java.util.HashMap;
import java.util.Map;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
public class SimpleWebScript extends DeclarativeWebScript {
public SimpleWebScript() {
}
protected Map<String, Object> executeImpl(WebScriptRequest req,
Status status) {
Map<String, Object> model = new HashMap<String, Object>();
model.put("hello", "Hello World");
return model;
}
}
11-30-2011 04:52 AM
12-01-2011 03:40 PM
12-02-2011 05:05 AM
04-19-2013 03:16 PM
05-22-2013 05:38 AM
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.