cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the ticketId?

neelesh100
Champ in-the-making
Champ in-the-making
Hi,

I am trying to get the ticketId to avoid multiple logins in a jsp that essentially browses the repository.

I have found a class in Alfresco:

InMemoryTicketComponentImpl which has a method getTicketId() which should solve my problem.

My question is,  how to get a handle to the intstance of the class that has the current ticketId in a jsp.

thanks

NS
6 REPLIES 6

gavinc
Champ in-the-making
Champ in-the-making
We store the authenticated User object in the HTTP session using a key of "_alfAuthTicket".

Within the JSP you can retrieve this object from the request object and then call getTicket().

neelesh100
Champ in-the-making
Champ in-the-making
Thanks, I will try this.
N.S

neelesh100
Champ in-the-making
Champ in-the-making
Hi, following up on this same topic, how would I get the "_alfAuthTicket" and then the ticket in  a .ftl file that is being used by a websrcipt?

Thanks in advance.
N.S

gavinc
Champ in-the-making
Champ in-the-making
Unfortunately you can't.

The HTTP request object is not available to freemarker templates during their execution.

mikeh
Star Contributor
Star Contributor
If I understand the question correctly, you can use
$(session.ticket}
within a Freemarker template to get the authentication ticket as a string.

thanks,
Mike

neelesh100
Champ in-the-making
Champ in-the-making
Thanks, you did understand my question correctly. I had figured it out, I was just going to post that, but thanks anyway.
N.S
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.