fix session timeout issue

removed tiles
various small cleanups
added session service to aid in debugging session issues
This commit is contained in:
lawson89
2014-08-13 11:20:59 -04:00
parent a4807a026c
commit 354826e645
24 changed files with 316 additions and 713 deletions

View File

@ -7,6 +7,8 @@ package org.owasp.webgoat.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -19,9 +21,10 @@ import org.springframework.web.servlet.ModelAndView;
*/
@Controller
public class Welcome {
final Logger logger = LoggerFactory.getLogger(Welcome.class);
private static final String WELCOMED = "welcomed";
@RequestMapping(value = "welcome.mvc", method = RequestMethod.GET)
public ModelAndView welcome(HttpServletRequest request,
@RequestParam(value = "error", required = false) String error,
@ -34,11 +37,13 @@ public class Welcome {
if (session.getAttribute(WELCOMED) == null) {
session.setAttribute(WELCOMED, "true");
}
//@TODO put stuff here the welcome page needs to access
//go ahead and send them to webgoat (skip the welcome page)
ModelAndView model = new ModelAndView();
model.setViewName("welcome");
//model.setViewName("welcome");
//model.setViewName("main_new");
model.setViewName("forward:/attack?start=true");
return model;
}
}