package hr.kapsch.javacro.session;

import javax.servlet.http.HttpSession;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

	@GetMapping("/")
	String sessionId(HttpSession session) {
		return session.getId();
	}

}

@@ -25,24 +25,48 @@
 o.session;%0A%0A
+import java.util.Date;%0A%0A
 import javax
@@ -263,16 +263,227 @@
 ller %7B%0A%0A
+%09private static final String TEMPLATE =%0A%09%09%09%22%3Ctable border=%5C%221%5C%22%3E%22 +%0A%09%09%09%22%3Ctr%3E%3Cth%3Eid%3C/th%3E%3Cth%3Ecreation time%3C/th%3E%3Cth%3Elast accessed time%3C/th%3E%3C/tr%3E%22 +%0A%09%09%09%22%3Ctr%3E%3Ctd%3E%25s%3C/td%3E%3Ctd%3E%25s%3C/td%3E%3Ctd%3E%25s%3C/td%3E%3C/tr%3E%22 +%0A%09%09%09%22%3C/table%3E%22;%0A%0A
 %09@GetMap
@@ -508,17 +508,19 @@
 sessionI
-d
+nfo
 (HttpSes
@@ -548,22 +548,129 @@
 urn 
-session.getId(
+String.format(TEMPLATE, session.getId(),%0A%09%09%09%09new Date(session.getCreationTime()), new Date(session.getLastAccessedTime())
 );%0A%09

Improve basic demo output