added cookies service

updated license info
This commit is contained in:
lawson89@gmail.com
2014-08-09 20:39:38 -04:00
parent 1430be8686
commit 16803b1130
12 changed files with 320 additions and 43 deletions

View File

@ -205,6 +205,8 @@ public class WebSession {
private String currentLanguage = null;
private List<Cookie> cookiesOnLastRequest;
/**
* Constructor for the WebSession object
*
@ -894,6 +896,17 @@ public class WebSession {
}
}
public void updateLastAttackRequestInfo(HttpServletRequest request) {
// store cookies
Cookie[] cookies = request.getCookies();
if (cookies == null) {
this.cookiesOnLastRequest = new ArrayList<Cookie>();
} else {
this.cookiesOnLastRequest = Arrays.asList(cookies);
}
}
private void restartLesson(int lessonId) {
AbstractLesson al = getLesson(lessonId);
System.out.println("Restarting lesson: " + al);
@ -982,4 +995,18 @@ public class WebSession {
return currentLanguage;
}
/**
* @return the cookiesOnLastRequest
*/
public List<Cookie> getCookiesOnLastRequest() {
return cookiesOnLastRequest;
}
/**
* @param cookiesOnLastRequest the cookiesOnLastRequest to set
*/
public void setCookiesOnLastRequest(List<Cookie> cookiesOnLastRequest) {
this.cookiesOnLastRequest = cookiesOnLastRequest;
}
}