As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
.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/webscriptssimple.get.desc.xml - <tomcat>/webapps/share/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/demo
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; } }
<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="">argument</format> </webscript>
<html> <head> <title>Hello World</title> </head> <body> ${hello} </body> </html>
<?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.alfresco.demo.simple.get" class="org.alfresco.module.demoscripts.SimpleWebScript" parent="webscript" /> </beans>