SPRING CONCEPTS
JSP · Jakarta Server Pages
Spring Concepts / JSP · Jakarta Server Pages
JSP is a server-side view technology for generating response content.
Understand the idea
Tomcat translates a JSP into a Servlet and compiles it. HTML markup, Expression Language, and JSTL tags then produce the rendered HTML. Keep business operations in Java classes and use JSP for presentation.
A concrete example
<c:forEach items="${todos}" var="todo">
<p><c:out value="${todo.title}"/></p>
</c:forEach>In the application
Manual 00 puts list.jsp and form.jsp under WEB-INF/views and reaches them through TodoServlet forwards.
Opening a JSP from disk does not run it. Visit the controller route on Tomcat.
Related concepts
- Servlet
- JSTL · Jakarta Standard Tag Library
- EL · Expression Language
- Server-side forward
- View / template