<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
And in JSTL 2.0, it should be:<%@ taglib prefix="c" uri="jakarta.tags.core" %>
Got the difference?<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt " %>
Now it should be as follows in JSTL 2.0:<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fn" uri="jakarta.tags.functions" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
And with Jakarta Standard Tag Library, you should use the following:<%@ taglib prefix="sql" uri="jakarta.tags.sql" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
If migrated to Jakarta XML tags, use the following declaration:<%@ taglib prefix="x" uri="jakarta.tags.xml" %>
Hope you find this post helpful in Java web development with JSP and JSTL.
Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.