Example usage for org.springframework.mock.web MockHttpServletRequest setRequestedSessionId

List of usage examples for org.springframework.mock.web MockHttpServletRequest setRequestedSessionId

Introduction

In this page you can find the example usage for org.springframework.mock.web MockHttpServletRequest setRequestedSessionId.

Prototype

public void setRequestedSessionId(@Nullable String requestedSessionId) 

Source Link

Usage

From source file:org.cateproject.test.functional.mockmvc.HtmlUnitRequestBuilder.java

private void processCookie(MockHttpServletRequest result, List<Cookie> cookies, Cookie cookie) {
    cookies.add(cookie);//from   w  w  w.  j  a va2s  .  c  o  m
    if ("JSESSIONID".equals(cookie.getName())) {
        result.setRequestedSessionId(cookie.getValue());
        result.setSession(httpSession(result, cookie.getValue()));
    }
}