java支持的webscript alfresco

时间:2014-03-10 11:30:43

标签: java alfresco web-scripting

错误:所有以下导入的“包org.springframework.extensions.webscripts”不存在

代码:

import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;

public class Test1 extends AbstractWebScript{
public void execute(WebScriptRequest req, WebScriptResponse res){
String name = "World from Java";  
}
}

1 个答案:

答案 0 :(得分:1)

您错过了类路径中的相关类。如果您正在使用maven,请将以下内容添加到您的pom中:

<dependency>
  <groupId>org.springframework.extensions.surf</groupId>
  <artifactId>spring-webscripts</artifactId>
  <version>1.2.0</version>
</dependency>