JSP API – Comparison between 5 JSP apis –
API | Description | Code Snippet |
---|---|---|
javax.servlet.jsp | This package contains the main interface and classes for the JavaServer Pages (JSP) technology. It includes classes for the JSP engine, as well as classes for generating and processing JSP pages. | <%@ page import= “javax.servlet.jsp.*” %> |
javax.el | The javax.el package provides the Expression Language (EL) for JSP and JavaServer Faces. The EL allows developers to easily access data stored in JavaBeans components, as well as to manipulate that data. | <%@ page import= “javax.el.*” %> |
javax.servlet.jsp.tagext | This package contains classes and interfaces for the Tag Extension API. The Tag Extension API allows developers to create custom JSP tags, which can be used to encapsulate complex functionality within a JSP page. | <%@ taglib uri= “http://java.sun.com/jsp/jstl/core” prefix=”c " %> |
javax.servlet.jsp.jstl | JSTL (JSP Standard Tag Library) is a collection of custom tags that provide a way to use core functionality such as iteration, conditional logic, and internationalization in a JSP page. | <%@ taglib uri= “http://java.sun.com/jsp/jstl/core” prefix=”c” %> |
javax.servlet.jsp.jstl.sql | This package provides a set of custom tags for working with SQL databases in a JSP page. | <sql:query var=”result” dataSource= “jdbc/myDB”>SELECT * FROM Employees</sql:query> |