cancel
Showing results for 
Search instead for 
Did you mean: 

Open an alfresco page on a specific space ?

sam69
Champ in-the-making
Champ in-the-making
Hi !
Is it possible to open an alfresco page on a specific space logged as a specific user.
I know it is possible to have a link pointing on a specified space, but logged as a guest. This is great, but I need more.
Do you think it 'is possible to login via Web Services for example and after that to open an alfresco windows on a specific space logged as a specific user ?

Thanks in advance for your response !

PS : After digging more deeply on Alfresco I still find it very amazing 😉
PS2 : sorry for my poor english 😉
11 REPLIES 11

sam69
Champ in-the-making
Champ in-the-making
Hello !

I can't make it work. Here is my test code :

//get ticket :
    String ticket = WebServiceFactory.getAuthenticationService().startSession("admin", "admin").getTicket();
    //remove "TICKET_" prefixe and add "?ticket="
    ticket = "?ticket=" + ticket.substring("TICKET_".length());
    String urlDetail = "http://dimension_1:8080/alfresco/navigate/showDocDetails/workspace/SpacesStore/66c17658-01fd-11db-ac..." + ticket;
    System.out.println(urlDetail);
    String urlDownload = "http://dimension_1:8080/alfresco/download/attach/workspace/SpacesStore/66c17658-01fd-11db-ac8c-fd68b...;
    System.out.println(urlDownload);
I got my 2 urls :
http://dimension_1:8080/alfresco/navigate/showDocDetails/workspace/SpacesStore/66c17658-01fd-11db-ac...
http://dimension_1:8080/alfresco/download/attach/workspace/SpacesStore/66c17658-01fd-11db-ac8c-fd68b...
Just after, I past it in IE -> I have a servlet exception :

java.lang.IllegalStateException: Impossible de cr?er une sessionapr?s que la r?ponse ait ?t? envoy?e
   org.apache.catalina.connector.Request.doGetSession(Request.java:2206)
   org.apache.catalina.connector.Request.getSession(Request.java:2024)
   org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
   org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)
   org.alfresco.web.app.servlet.BaseServlet.redirectToLoginPage(BaseServlet.java:158)
   org.alfresco.web.app.servlet.BaseServlet.servletAuthenticate(BaseServlet.java:129)
   org.alfresco.web.app.servlet.DownloadContentServlet.doGet(DownloadContentServlet.java:108)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

And when I try the urls in firefox, I don't have an exception but I get the alfresco's identification screen. If I login, it show the right page.

I run the 1.3.0dev version of alfresco on Windows XP Pro.

Do you have any idea ?

Thanks,
Samuel

sam69
Champ in-the-making
Champ in-the-making
Up !
I tested with Alfresco 1.4.0RC1, and it's still not working…
I still got the  exception in alfresco :

java.lang.IllegalStateException: Impossible de cr?er une sessionapr?s que la r?ponse ait ?t? envoy?e 
[b]Translation of the message : [/b] Unable to create a session after response has been sent.
at org.apache.catalina.connector.Request.doGetSession(Request.java:2206)
at org.apache.catalina.connector.Request.getSession(Request.java:2024)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)
at org.alfresco.web.app.servlet.BaseServlet.redirectToLoginPage(BaseServlet.java:179)
at org.alfresco.web.app.servlet.BaseServlet.servletAuthenticate(BaseServlet.java:144)
at org.alfresco.web.app.servlet.BaseServlet.servletAuthenticate(BaseServlet.java:109)
at org.alfresco.web.app.servlet.ExternalAccessServlet.service(ExternalAccessServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

Does anybody manage to get it work ?