0% found this document useful (0 votes)
23 views10 pages

INTRODUCTION TO JSP NN

Uploaded by

Cricket Top 10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views10 pages

INTRODUCTION TO JSP NN

Uploaded by

Cricket Top 10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

INTRODUCTION TO JSP

INTRODUCTION

 It stands for java server pages


 It is a server side technology
 It is used for creating dynamic web contents
 It is used to creating web application
 In this JSP tags are used to insert JAVA code into HTML pages
 It is an advanced version of Servlet Technology
 It is web based technology helps us to create dynamic and platform independent web
pages
FEATURES OF JSP

 CODING IN JSP IS EASY –As it is just adding JAVA code to HTML/XML


 REDUCTION IN THE LENGTH OF THE CODE – In JSP we use action
tags ,custom tags etc.
 CONNECTION TO DATABASE IS EASIER – It is easier to connect website to
database and allows to read or write data easily to the database.
 MAKE INTERACTIVE WEBSITES – In this we can create dynamic web pages
which helps user to interact in real time environment.
 PORTABLE, POWERFULL,FLEXIBLE AND EASY TO MAINTAIN – as these
are browser and server independent.
JSP TAGS

DECLARATION TAGS:
It is used to declare variables.

SYNTAX:
<%! Dec Var %>

EXAMPLE:
<%! Int var=10; %>
JSP TAGS

JAVA SCRIPLETS:
It allows us to add any number of JAVA code , variables and expressions.

SYNTAX:
<% Java code %>
JSP TAGS

JAVA COMMENTS:
It contains the text that is added for information which has to be ignored.

SYNTAX:
<% -- JSP comments --%>
JSP TAGS

JSP EXPRESSION:
It evaluates and convert the expression to a string.

SYNTAX:
<%= expression =%>

EXAMPLE:
<% num1 = num1+num2 %>
ADVANTAGES AND DISADVANTAGES
OF USING JSP
ADVANTAGES OF JSP
 It does not require advanced knowledge of JAVA
 It is capable of handling exceptions
 Easy to use and learn
 It can tags which are easy to use and understand
 It is suitable for both JAVA and non JAVA programmer
DISADVANTAGES OF JSP
 Difficult to debug for errors
 First time access leads to wastage of time
 It’s output is HTML which lacks features
EXAMPLE

Demo.jsp

<html>
<head>
<title>HELLO WORLD</title>
</head>
<body>
<%= “HELLO WORLD” %>
</body>
</html>
THANK YOU

You might also like