AnsweredAssumed Answered

SURF - page de login

Question asked by cytrix on Oct 2, 2009
Latest reply on Oct 5, 2009 by cytrix
Bonjour,

En plus de mes questions sur l'accès au repository alfresco (voir http://forums.alfresco.com/fr/viewtopic.php?f=25&t=3432), je me pose également des questions sur la page login.ftl par défaut dans SURF.
En récupérant tel quel SURF dans svn, et sans modifier aucun fichiers de configuration, cette page ne fonctionne pas quand j'essaie d'y accèder via l'url : http://127.0.0.1:8080/surf/page?p=login
J'ai une erreur de ce type :

2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.utils.ServerNameMatcher DEBUG: looking for hostname match on current server name 127.0.0.1
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter DEBUG: checking for status path on /surf/page
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: processing request for /page
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: query string added
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: there are no rules setup.  not rewriting request.
11:39:01,092  ERROR [freemarker.runtime]

on line 34, column 73 in common/login.ftl link not found.
The problematic instruction:
———-
==> user-directive link [on line 34, column 73 in common/login.ftl]
———-

Java backtrace for programmers:
———-
freemarker.core.InvalidReferenceException: on line 34, column 73 in common/login.ftl link not found.
   at freemarker.core.UnifiedCall.accept(UnifiedCall.java:134)
   at freemarker.core.Environment.visit(Environment.java:208)
   at freemarker.core.Environment.visit(Environment.java:297)
   at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
   at freemarker.core.Environment.visit(Environment.java:208)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:208)
   at freemarker.core.Environment.process(Environment.java:188)
   at freemarker.template.Template.process(Template.java:237)
   at org.alfresco.web.scripts.PresentationTemplateProcessor.process(PresentationTemplateProcessor.java:185)
   at org.alfresco.web.scripts.FreemarkerProcessor.executeBody(FreemarkerProcessor.java:266)
   at org.alfresco.web.framework.render.AbstractProcessor.execute(AbstractProcessor.java:85)
   at org.alfresco.web.framework.render.RenderHelper.processTemplate(RenderHelper.java:385)
   at org.alfresco.web.framework.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:78)
   at org.alfresco.web.framework.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:129)
   at org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   at org.alfresco.web.framework.render.bean.PageRenderer.body(PageRenderer.java:81)
   at org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   at org.alfresco.web.framework.render.RenderUtil.startPageRenderer(RenderUtil.java:144)
   at org.alfresco.web.framework.render.RenderUtil.renderPage(RenderUtil.java:117)
   at org.alfresco.web.framework.render.PresentationUtil.renderPage(PresentationUtil.java:86)
   at org.alfresco.web.site.servlet.DispatcherServlet.dispatchPage(DispatcherServlet.java:512)
   at org.alfresco.web.site.servlet.DispatcherServlet.dispatch(DispatcherServlet.java:389)
   at org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:165)
   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.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:595)
11:39:01,107  ERROR [web.site.FrameworkHelper] A Page Rendering problem was handled
11:39:01,107  ERROR [web.site.FrameworkHelper] Page Id: login
11:39:01,107  ERROR [web.site.FrameworkHelper] Trace
org.alfresco.web.framework.exception.RendererExecutionException: FreemarkerProcessor failed to process template: /common/login.ftl
   at org.alfresco.web.scripts.FreemarkerProcessor.executeBody(FreemarkerProcessor.java:276)
   at org.alfresco.web.framework.render.AbstractProcessor.execute(AbstractProcessor.java:85)
   at org.alfresco.web.framework.render.RenderHelper.processTemplate(RenderHelper.java:385)
   at org.alfresco.web.framework.render.bean.TemplateInstanceRenderer.calculateComponentDependencies(TemplateInstanceRenderer.java:78)
   at org.alfresco.web.framework.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:129)
   at org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   at org.alfresco.web.framework.render.bean.PageRenderer.body(PageRenderer.java:81)
   at org.alfresco.web.framework.render.AbstractRenderer.render(AbstractRenderer.java:105)
   at org.alfresco.web.framework.render.RenderUtil.startPageRenderer(RenderUtil.java:144)
   at org.alfresco.web.framework.render.RenderUtil.renderPage(RenderUtil.java:117)
   at org.alfresco.web.framework.render.PresentationUtil.renderPage(PresentationUtil.java:86)
   at org.alfresco.web.site.servlet.DispatcherServlet.dispatchPage(DispatcherServlet.java:512)
   at org.alfresco.web.site.servlet.DispatcherServlet.dispatch(DispatcherServlet.java:389)
   at org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:165)
   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.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.web.scripts.WebScriptException: 09020004 Failed to process template /common/login.ftl
   at org.alfresco.web.scripts.PresentationTemplateProcessor.process(PresentationTemplateProcessor.java:189)
   at org.alfresco.web.scripts.FreemarkerProcessor.executeBody(FreemarkerProcessor.java:266)
   … 29 more
Caused by: freemarker.core.InvalidReferenceException: on line 34, column 73 in common/login.ftl link not found.
   at freemarker.core.UnifiedCall.accept(UnifiedCall.java:134)
   at freemarker.core.Environment.visit(Environment.java:208)
   at freemarker.core.Environment.visit(Environment.java:297)
   at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
   at freemarker.core.Environment.visit(Environment.java:208)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:208)
   at freemarker.core.Environment.process(Environment.java:188)
   at freemarker.template.Template.process(Template.java:237)
   at org.alfresco.web.scripts.PresentationTemplateProcessor.process(PresentationTemplateProcessor.java:185)
   … 30 more
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.utils.ServerNameMatcher DEBUG: looking for hostname match on current server name 127.0.0.1
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter DEBUG: checking for status path on /surf/images/misc/collapsed.gif
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: processing request for /images/misc/collapsed.gif
2 oct. 2009 11:39:01 org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: there are no rules setup.  not rewriting request.
D'où vient l'exception et comment la corriger ?

A quoi sert exactement cette page ? Permet-elle notamment de s'authentifier lorsque l'on protège une page ou exécute du code javascript (dans ce cas on n'aurait pas besoin d'utiliser la méthode d'authentification REST retournant un ticket alfresco) ?

<?xml version='1.0' encoding='UTF-8'?>
<page>
   <id>home</id>
   <title>Sample home page</title>
   <template-instance>index</template-instance>
   <authentication>[b]user[/b]</authentication>
</page>

Je n'ai pas vu non plus de configuration vers une base de données ou quoi que ce soit dans SURF et je ne vois pas comment la page de login pourrait connaître l'utilisateur admin/admin par exemple. Est-ce tout simplement un appel javascript vers le projet tomcat alfresco (qui lui est branché sur la base de données et peut récupérer des utilisateurs) ?

Merci d'avance pour tous vos éclaircissements :) .

Outcomes