package org.seasar.jsf.util;

import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author higa
 *  
 */
public class FacesContextUtil {

	private FacesContextUtil() {
	}

	public static HttpServletRequest getRequest(FacesContext context) {
		ExternalContext extContext = context.getExternalContext();
		return (HttpServletRequest) extContext.getRequest();
	}
	
	public static HttpServletResponse getResponse(FacesContext context) {
		ExternalContext extContext = context.getExternalContext();
		return (HttpServletResponse) extContext.getResponse();
	}
}