JSP Advantages and Features
JSP Advantages and Features
Rakhshana.R 24-pcs-005
Introduction to jsp
Why do we Need JSP?
Advantages
Features
Conclusion
Sources
Introduction
JSP
In Java, JSP stands for Jakarta Server Pages
(JSP; formerly JavaServer Pages). It is a server-side
technology that is used for creating web
applications. It is used to create dynamic web
content. JSP consists of both HTML tags and JSP
tags. It is an advanced version of Servlet
Technology i.e. a web-based technology that helps us
to create dynamic and platform-independent web
pages.
Why do we
Need JSP?
Being a server-side programming language, it helps
in creating dynamic web pages. Not only with Java
APIs but a connection with the database is an
added advantage, which was previously impossible.
In JSP, you can combine action commands and
textual data. You can extract values from dynamic
content, such as checkboxes and action
buttons. It can access JavaBeans or an object of it
too.
How is JSP more Advantageous
than Servlet?
<html> <html>
<body> <body>
<% out.print("welcome to jsp"); <%= "welcome to jsp" %>
%> </body>
</body> </html>
</html>
Features of JSP
Make Interactive
Declaration Tag Implicit Objects
Websites
Used to declare variables Provides built-in objects that Facilitates the creation of
and methods within JSP reduce the length of code dynamic web pages that
pages interact with users in real-
Ex: response,request,out time
Jsp Declaration Tag
declares field declares method
<html> <body>
<html>
<%!
<body> int cube(int n){
<%! int data=50; %> return n*n*n*;
<%= "Value of the variable }
is:"+data %> %>
</body> <%= "Cube of 3 is:"+cube(3)
</html> %>
</body> </html>
Features of JSP
Connection to Extension to Portable, Powerful, Flexible,
Database is Easier Servlet and Easy to Maintain
JSP is dynamic, secure, JSP can manage errors Initial access can be
and platform-independent, and exceptions effectively slower as JSP pages
so no need for need to be compiled
redeployment or
recompilation
Conclusion
https://www.educba.com/what-is-jsp/
https://www.geeksforgeeks.org/introd
uction-to-jsp/
https://www.javatpoint.com/jsp-tutorial
https://www.tutorialspoint.com/jsp/
index.htm
Thank
You