Examples of addResponseCookie()


Examples of javax.faces.context.ExternalContext.addResponseCookie()

                    properties.put("path", val);
                }
                if (null != (val = toSet.isHttpOnly())) {
                    properties.put("httpOnly", val);
                }
                extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                        !properties.isEmpty() ? properties : null);
                properties = null;
            }
            contextMap.put(CONSTANTS.DidWriteCookieAttributeName, Boolean.TRUE);
        }
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

        InputStream inputStream = null;

        try {
            externalContext.setResponseContentType(content.getContentType());
            externalContext.setResponseHeader("Content-Disposition", contentDispositionValue + ";filename=\"" + content.getName() + "\"");
            externalContext.addResponseCookie(Constants.DOWNLOAD_COOKIE, "true", Collections.<String, Object>emptyMap());

            if(RequestContext.getCurrentInstance().isSecure()) {
                externalContext.setResponseHeader("Cache-Control", "public");
                externalContext.setResponseHeader("Pragma", "public");
            }
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

                }
                if (null != (val = toSet.getPath())) {
                    properties.put("path", val);
                }
                properties.put("httpOnly", Boolean.TRUE);
                extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                        !properties.isEmpty() ? properties : null);
                properties = null;
            }
            contextMap.put(CONSTANTS.DidWriteCookieAttributeName, Boolean.TRUE);
        } else if (!extContext.isResponseCommitted()) {
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

            }
            if (null != (val = toSet.getPath())) {
                properties.put("path", val);
            }
            properties.put("httpOnly", Boolean.TRUE);
            extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                    !properties.isEmpty() ? properties : null);
            properties = null;          
        }
    }
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

      properties.put("path", path);
    }

    properties.put("maxAge", maxAge);
    properties.put("secure", ((HttpServletRequest) externalContext.getRequest()).isSecure());
    externalContext.addResponseCookie(name, value, properties);
  }

  /**
   * {@inheritDoc}
   * @see Faces#removeResponseCookie(String, String)
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

                    properties.put("secure", val);
                }
                if (null != (val = toSet.getPath())) {
                    properties.put("path", val);
                }
                extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                        !properties.isEmpty() ? properties : null);
                properties = null;

            }
            contextMap.put(CONSTANTS.DidWriteCookieAttributeName, Boolean.TRUE);
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

                properties.put("secure", val);
            }
            if (null != (val = toSet.getPath())) {
                properties.put("path", val);
            }
            extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                    !properties.isEmpty() ? properties : null);
            properties = null;          
        }
    }
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

                }
                if (null != (val = toSet.getPath())) {
                    properties.put("path", val);
                }
                properties.put("httpOnly", Boolean.TRUE);
                extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                        !properties.isEmpty() ? properties : null);
                properties = null;
            }
            contextMap.put(CONSTANTS.DidWriteCookieAttributeName, Boolean.TRUE);
        }
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

                    properties.put("secure", val);
                }
                if (null != (val = toSet.getPath())) {
                    properties.put("path", val);
                }
                extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                        !properties.isEmpty() ? properties : null);
                properties = null;

            }
            contextMap.put(CONSTANTS.DidWriteCookieAttributeName, Boolean.TRUE);
View Full Code Here

Examples of javax.faces.context.ExternalContext.addResponseCookie()

                    properties.put("secure", val);
                }
                if (null != (val = toSet.getPath())) {
                    properties.put("path", val);
                }
                extContext.addResponseCookie(toSet.getName(), toSet.getValue(),
                        !properties.isEmpty() ? properties : null);
                properties = null;

            }
            contextMap.put(CONSTANTS.DidWriteCookieAttributeName, Boolean.TRUE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.