

1 import javax.servlet.http.HttpServletResponse;
2 public static void location(String page)
3 {
4 try
5 {
6 FacesContext context = FacesContext.getCurrentInstance();
7 HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
8 response.sendRedirect(page);
9 }
10 catch(Exception ex){ex.printStackTrace();}
11 }