AnsweredAssumed Answered

Surf and web scripts

Question asked by nilsw on Nov 16, 2009
Latest reply on Nov 17, 2009 by nilsw
Hello

I am trying to follow the Surf tutorial at http://www.benh.co.uk/alfresco/surf-part-1-getting-started/
but get stuck pretty soon when Surf cannot find the web scripts.

http://localhost:8080/surf/service/header

(or /surf/service/index or any other script name) only results in

08:10:33,862  ERROR [web.scripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 10160058 Script url /header does not map to a Web Script.
org.alfresco.web.scripts.WebScriptException: 10160058 Script url /index does not map to a Web Script.
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:145)
        at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:391)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
        at java.lang.Thread.run(Thread.java:619)

I am obviously doing something fundamentally wrong. I use Alfresco 3.2 community edition.

web-framework-application-context.xml contains this:


   <bean id="webframework.store.webscripts" class="org.alfresco.web.scripts.ClassPathStore">
      <property name="mustExist"><value>true</value></property>
      <property name="classPath"><value>alfresco/site-webscripts</value></property>
   </bean>
  
   <bean id="webframework.store.webscripts.custom" class="org.alfresco.web.scripts.ClassPathStore">
      <property name="mustExist"><value>false</value></property>
      <property name="classPath"><value>alfresco/web-extension/site-webscripts</value></property>
   </bean>

and the web script files are in WEB-INF/classes/alfresco/site-webscripts as the tutorial says.

Any ideas what I can do to get this working?

Outcomes