Code example for ServletWebRequest

0
     * @return the return view 
     */ 
    public ResetPasswordForm initResetPasswordForm(HttpServletRequest request) { 
        ResetPasswordForm resetPasswordForm = new ResetPasswordForm(); 
        String username = null; 
        if (BLCRequestUtils.isOKtoUseSession(new ServletWebRequest(request))) { 
            username = (String) request.getSession(true).getAttribute("forgot_password_username"); 
        } 
        String token = request.getParameter("token"); 
        resetPasswordForm.setToken(token); 
        resetPasswordForm.setUsername(username); 
        return resetPasswordForm; 
    } 
 
    /** 
     * @return the view representing the login page. 
     */ 
    public String getLoginView() { 
        return loginView; 
    } 
Contextual code suggestions in your IDE  Get Codota for Java