<%
include("/jagg/jagg.jag");

(function () {
    response.contentType = "application/json; charset=UTF-8";
    var log=new Log();
    var action = request.getParameter("action");
    if (action === "sessionCheck" && request.getMethod() == 'POST') {
         if (log.isDebugEnabled()) {
            log.debug("session check for" + jagg.getUser());
         }
         if(jagg.getUser() == null){
            print({
                error:true,
                message:'timeout'
            });
        }
    } else {
        print({
            error:true,
            message:msg.error.invalidAction(action)
        });
    }
}());
%>