Example usage for org.springframework.web.context.request WebRequest isSecure

List of usage examples for org.springframework.web.context.request WebRequest isSecure

Introduction

In this page you can find the example usage for org.springframework.web.context.request WebRequest isSecure.

Prototype

boolean isSecure();

Source Link

Document

Return whether this request has been sent over a secure transport mechanism (such as SSL).

Usage

From source file:com.devnexus.ting.web.controller.CallForPapersController.java

@RequestMapping(value = "/cfp", method = RequestMethod.GET)
public String openAddCfp(ModelMap model, WebRequest request) {

    final String cfpState = environment.getProperty("cfp.state");

    if ("closed".equalsIgnoreCase(cfpState)) {
        return "redirect:/s/index";
    }//from  w  w w .  j  a  v  a  2  s  . co m

    model.addAttribute("headerTitle", "Call for Papers");
    model.addAttribute("tag", "We would love to review your   session proposals!");

    Event event = businessService.getCurrentEvent();
    CfpSubmission cfpSubmission = new CfpSubmission();
    cfpSubmission.setEvent(event);
    CfpSubmissionSpeaker speaker = new CfpSubmissionSpeaker();
    speaker.setCfpSubmission(cfpSubmission);
    cfpSubmission.getSpeakers().add(speaker);

    model.addAttribute("cfpSubmission", cfpSubmission);
    prepareReferenceData(model, request.isSecure());

    return "cfp";

}

From source file:org.broadleafcommerce.common.RequestDTOImpl.java

public RequestDTOImpl(WebRequest request) {
    // Page level targeting does not work for WebRequest.
    secure = request.isSecure();
}