[color=“red”]ComandoLogin.java [43:1] missing return statement
}
^
1 error
Errors compiling ComandoLogin.[/color]O Codigo Seguinte…
import javax.servlet.http.;
import beans.;
import java.util.;
import java.sql.;
public class ComandoLogin implements IComando
{
String strNext ="";
public ComandoLogin(String strPAnext)throws java.sql.SQLException
{
strNext = strPAnext;
}
public String executa(HttpServletRequest request)
{
try
{
String strLogin = request.getParameter("login");
String strSenha = request.getParameter("senha");
/**
*Acesso ao Banco de Dados
**/
RepositorioSQL repSQL = RepositorioSQL.getInstance();
if (repSQL.verificaLogin(strLogin, strSenha))
{
BeanPessoa bp = new BeanPessoa();
bp.setCodigo(1);
HttpSession session = request.getSession(true);
session.setAttribute("pessoa",bp);
return strNext;
}else
{
return "/erro.jsp";
}
}catch (Exception e)
{}
}
}