Problem with taglig in Java

Asked

Viewed 38 times

0

I’m building a pageant JSP, however, I’m having a problem referencing my taglib of jstl. I’m referencing it this way:

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

But in the Eclipse I am getting the following error message:

Can not find the tag library Descriptor for "http://java.sun.com/jsp/jstl/core"

Follow the code of my page below JSP:

<%@page contentType="text/html"%>
<%@page pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <title>Mostrando contatos</title>
    </head>
    <body>

        <table border="1" cellpadding="2" cellspacing="0">
            <tr>
                <th>ID - Atualizar</th>
                <th>Nome</th>
                <th>E-mail</th>
                 <th>Excluir </th>
            </tr>

        <c:forEach var="lista" items="${ requestScope.contatosList }">
            <tr>
                <td>
                    <a href="FrontController?action=SelecionarContato&id=${lista.codigo}">
                        ${lista.codigo}
                </a>
                                    </td>
                <td>${lista.nome}</td>
                <td>${lista.email}</td>

                <td>
                    <a href="FrontController?action=DeletarContato&id=${lista.codigo}">
                        Excluir
                    </a>
                </td>
            </tr>

        </c:forEach>
        </table>
                <br />
        <a href="formGravarContato.jsp">Adicionar um novo Autor</a>
        <br />
        <a href="index.jsp">Página Principal</a>
    </body>
</html>

Below is a screenshot of the error:

inserir a descrição da imagem aqui

Could someone help me solve this problem?

  • 1

    Try to add the . jar from JSTL implementation to its lib folder. Download here: http://search.maven.org/#Browse|-1002239620 Download the file: javax.servlet.jsp.jstl-1. 2.1.jar If this is not the resolution, try the following: Right click on the project, properties -> Targeted runtimes, and then select the server you are using. In en-US OS, there is also a similar post with several response suggestions Follow link: http://stackoverflow.com/questions/5987908/how-to-resolve-can-not-find-the-tag-library-descriptor-for-http-java-sunco

1 answer

2


Browser other questions tagged

You are not signed in. Login or sign up in order to post.