Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use <c:if> in jsp file. eclipse said it is unknown tag [duplicate]

I want to write a simple web page in .jsp file. I need to use <c:if> tag. but it is not recognized. eclipse said it is unknown tag.

I googled it and some said I need to include the standard lib (which is JSTL?).

I just want to use some basic tags in jsp file such as <c:if>. Do I really need to include any libraries? If so, what libraries do I need to include? And how to do that in Eclipse? Please let me know step by step about how to import/include these libraries or build path so that I can use <c:if> in my jsp file.

like image 640
Joey Avatar asked Jul 12 '12 21:07

Joey


1 Answers

Make sure that you have a taglib declaration in your JSP file

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

Also, make sure that you've added JSTL jar files to your project classpath.

like image 98
Alexander Pogrebnyak Avatar answered Oct 25 '22 01:10

Alexander Pogrebnyak