Spring MVC with JSP (Java server Page). Spring-Ep:11

Опубликовано: 11 Март 2026
на канале: Ajoy Debnath
123
11

Hi,
Hope you are all doing great. Let's learn together.

Join Telegram: 📲 https://t.me/contactajoydebnath

Chapters❤
0:00 Introduction
02:42 Previous video's topic discussion
17:46 JSP Theory
21:42 JSP Life Cycle
23:21 Scriptlet tag, Expression tag, Declaration Tag
42:13 JSP Implicit Objects
43:43 Implicit object 'out'
43:53 Implicit object 'request'
58:08 Implicit object 'response'
01:00:45 Implicit object 'config'
01:07:21 Implicit object 'application'
01:09:11 Implicit object 'session'
01:22:55 Implicit object 'pageContext'
01:28:13 Implicit object 'page'

Note:
Spring is a lightweight framework. It was developed by Rod Johnson in 2003. Spring framework makes the easy development of JavaEE applications.

Video Links:
Core Java Playlist:
   • Core Java  

Spring Playlist:
   • Spring Framework  

Spring Video List:
Model-View-Controller(MVC), Spring MVC. --    • Model-View-Controller(MVC), Spring MVC. Sp...  
JDBCTemplate, RowMapper,ResultSetExtractor,BeanPropertyRowMapper Spring --    • JDBCTemplate, RowMapper,ResultSetExtractor...  
Spring JDBCTemplate, JDBC, Statement and PreparedStatement --    • Spring JDBCTemplate, JDBC, Statement and P...  
What if we remove @Configuration annotation in Spring? --    • What if we remove the @Configuration annot...  
@Configuration, @Bean, @Component, @ComponentScan in Spring. --    • @Configuration, @Bean, @Component, @Compon...  
Autowiring, Autowiring Modes - byName, byType & constructor. --    • Autowiring, Autowiring Modes - byName, byT...  


Document Link -
Spring MVC
https://docs.google.com/document/d/16...

JSP
https://docs.google.com/document/d/1G...

Like, Comment, Share, and Subscribe.
Thank you again.

STS Link:
https://spring.io/tools

Eclips Download
https://www.eclipse.org/downloads/pac...

Tomcat Download
https://tomcat.apache.org/download-90...

JDK Link:
https://www.oracle.com/java/technolog...

To download spring jars
https://repo.spring.io/ui/native/rele...

MYSql Connector JAR
https://mvnrepository.com/artifact/my...

MYSql Installer
https://dev.mysql.com/downloads/insta...

JSP
JSP technology is used to create web applications just like Servlet technology.
It is an extension of Servlet because it provides more functionality than servlet such as expression language, JSTL, etc.
A JSP page consists of HTML tags and JSP tags.

A JSP page services requests as a servlet. Thus, the life cycle and many of the capabilities of JSP pages (in particular the dynamic aspects) are determined by Java Servlet technology.

Java Servlet Technology
As soon as the web began to be used for delivering services, service providers recognized the need for dynamic content. Applets, one of the earliest attempts toward this goal, focused on using the client platform to deliver dynamic user experiences. At the same time, developers also investigated using the server platform for this purpose. Initially, Common Gateway Interface (CGI) scripts were the main technology used to generate dynamic content. Although widely used, CGI scripting technology has a number of shortcomings, including platform dependence and lack of scalability. To address these limitations, Java Servlet technology was created as a portable way to provide dynamic, user-oriented content.

Scripting elements
In JSP, java code can be written inside the JSP page using the scriptlet tag. Let's see what are the scripting elements first.

JSP scriptlet tag
A scriptlet tag is used to execute java source code in JSP. Syntax is as follows:

JSP expression tag
The code placed within JSP expression tag is written to the output stream of the response. So you need not write out.print() to write data. It is mainly used to print the values of variable or method.
Syntax of JSP expression tag

Note: Do not end your statement with semicolon in case of expression tag.

JSP Declaration Tag
The JSP declaration tag is used to declare fields and methods.
The code written inside the jsp declaration tag is placed outside the service() method of auto generated servlet.
So it doesn't get memory at each request.
Syntax of JSP declaration tag


JSP Implicit Objects
There are 9 jsp implicit objects. These objects are created by the web container that is available to all the jsp pages.

JspWriter - out.print("Hello World”)
request -- HttpServletRequest - request.getContextPath()
response -- HttpServletResponse - response.sendRedirect("https://www.google.com/")
config -- ServletConfig - config.getInitParameter("paramName")
application -- ServletContext – application.getInitParameter("paramname")
session -- HttpSession – session.setAttribute("xyx", "Hello World");
pageContext PageContext – set, get or remove the attribute from different scope like - page, session, application, etc.
exception - Throwable
page - Object