Skip to content

Instantly share code, notes, and snippets.

@scopevale
Forked from bradrice/setsession.vtl
Created October 14, 2016 14:41
Show Gist options
  • Select an option

  • Save scopevale/b0851ccacdb238209bd0027b2aa25ed0 to your computer and use it in GitHub Desktop.

Select an option

Save scopevale/b0851ccacdb238209bd0027b2aa25ed0 to your computer and use it in GitHub Desktop.
Set session in dotcms
#set($ses = $request.getSession(true))
#set($item = $request.getParameter('courseid'))
#set($_dummy = $ses.setMaxInactiveInterval(1800))
#set($myCookie = $request.getCookies())
#foreach($cookie in $myCookie)
#if($cookie.getName().equals("JSESSIONID"))
#set($ck = $cookie)
#set($_dummy = $ck.setMaxAge(1800))
#end
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment