sairam
sairam

Reputation: 25

Multiple annotations found at this line: in jsp code

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<!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=EUC-KR">
        <title> :: Employee List :: </title>
    </head>
    <body>
        <table border=1>
            <thead>
                <tr>
                    <th>ID</th>
                    <th>Name</th>
                    <th>DOB</th>
                    <th>Salary</th>
                    <th>Active</th>
                    <th colspan=2>Action</th>
                </tr>
            </thead>
            <tbody> <!-- My warnings start from here for unknown tag... -->

            <c:forEach items="${employees}" var="employee">
                <tr>
                    <td><c:out value="${employee.employeeId}" /></td>
                    <td><c:out value="${employee.employeeName}" /></td>

                    <td><fmt:formatDate pattern="yyyy-MMM-dd" value="${employee.dob}" /></td>
                    <td><c:out value="${employee.salary}" /></td>
                    <td><c:out value="${employee.active}" /></td>
                    <td><a href="EmployeeServlet?action=edit&empId=<c:out value="${employee.employeeId}"/>">Update</a></td>
                    <td><a href="EmployeeServlet?action=delete&empId=<c:out value="${employee.employeeId}"/>">Delete</a></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <p><a href="EmployeeServlet?action=insert">Add Employee</a></p>
    </body>
</html>

Upvotes: 0

Views: 18839

Answers (3)

iamfnizami
iamfnizami

Reputation: 183

I faced same and forgot to include jstl core taglib.

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

Also use isELIgnored="false" in page tag.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" isELIgnored="false" %>

Upvotes: 0

cнŝdk
cнŝdk

Reputation: 32145

Make sure you include all the required jars in your build path, and most important you are missing the import of JSTL core taglib in your JSP document, add the following:

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

For further information take a look at this tutorial:

Upvotes: 2

Kulbhushan Singh
Kulbhushan Singh

Reputation: 625

Add the core tag lib in your JSP.

Upvotes: 1

Related Questions