JSP: Item page not found

1

I'm scheduling a page to tell you that the searched item was not found. I wanted to know what I'm doing wrong and what would be a solution.

<c:forEach items="${proposta}" var="proposta">
            <div>
            <img src="..." alt="..." class="img-circle">
            <c:if test="${proposta.getTitulo() == 'null'}">
                <h1>Página não Encontrada</h1>
            </c:if>
            <br>
                <label>titulo:</label>
                <label>${proposta.getTitulo()}</label>
            <br>
                <label>subtitulo:</label>
                <label>${proposta.getSubtitulo()}</label>
            <br>
                <label>Necessidade:</label>
                <label>${proposta.getNecessidadeString()}</label>
            <br>
                <label>Area de Interesse :</label>
                <label>${proposta.getArea_interesseString()}</label>
            <br>
            <a class="btn btn-primary btn-sm" href="proposta?id=${proposta.getId_proposta()}">Exibir proposta </a>
            <br>
            </div>
        </c:forEach>
    
asked by anonymous 28.04.2015 / 18:53

1 answer

2

The bean and method, without the items at the beginning, should be indicated in get , which returns the list of proposals, eg:

items="${managedBean.listaDePropostas}" .

To show the result you do not need to use get and neither of the parentheses is ${proposta.titulo} .

    
06.05.2015 / 21:02