eu defini um método enviar no Bean, mas o problema é que o JSP sempre acusa erro neste trecho actionListener="#{usuarioBean.enviar}" o usuarioBean.enviar é onde tá o erro
Abaixo seguem os códigos
package br.anderson.view;
import java.awt.event.ActionEvent;
public class UsuarioBean {
private String nome;
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public void enviar(ActionEvent event) {
this.setNome(this.getNome().toUpperCase());
}
}
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Minha primeira aplicação</title>
</head>
<body>
<f:view>
<h:form>
<h:outputLabel value="Nome: "/>
<h:inputText value="#{usuarioBean.nome}"/>
<h:commandButton value="Enviar" actionListener="#{usuarioBean.enviar}"/>
</br>
<h:outputText value="Bem vindo a primeira aplicação JSF, #{usuarioBean.nome}" rendered="#{usuarioBean.nome != null}"/>
</h:form>
</f:view>
</body>
</html>