Пример #1
0
 public void login() throws IOException {
   try {
     current = userService.find(username, password);
     FacesContext.getCurrentInstance().getExternalContext().redirect("pages/read.jsf");
   } catch (PostException e) {
     FacesContext.getCurrentInstance()
         .addMessage(
             null, new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), e.getMessage()));
   }
 }