List of usage examples for org.springframework.mock.web MockHttpServletRequest isSecure
@Override public boolean isSecure()
From source file:org.cateproject.test.functional.mockmvc.HtmlUnitRequestBuilder.java
private com.gargoylesoftware.htmlunit.util.Cookie createCookie(MockHttpServletRequest request, String sessionid) {// w w w .j a v a2s . c o m return new com.gargoylesoftware.htmlunit.util.Cookie(request.getServerName(), "JSESSIONID", sessionid, request.getContextPath() + "/", null, request.isSecure(), true); }
From source file:org.osaf.cosmo.BaseMockServletTestCase.java
/** */ protected String toAbsoluteUrl(MockHttpServletRequest request, String path) { StringBuffer url = new StringBuffer(request.getScheme()); url.append("://").append(request.getServerName()); if ((request.isSecure() && request.getServerPort() != 443) || (request.getServerPort() != 80)) { url.append(":").append(request.getServerPort()); }/*from w w w . j av a 2s .com*/ if (!request.getContextPath().equals("/")) { url.append(request.getContextPath()); } url.append(path); return url.toString(); }