Chapter 1 JSP
Chapter 1 JSP
Semester: Seven
• Servlets are pure Java, whereas JSP combines Java code and
HTML for dynamic web page generation.
•A Servlet is a Java class that runs into a web container, and JSP
is a text document that contains both static and dynamic data.
• A JSP page consists of HTML tags and JSP tags. The JSP pages
are easier to maintain than Servlet because we can separate
designing and development. It provides some additional
features such as Expression Language, Custom Tags, etc.
A. Extension to Servlet
D. Less code than Servlet: In JSP, we can use many tags such as action
tags, JSTL, custom tags, etc. that reduces the code. Moreover, we can
use EL, implicit objects, etc.
index.jsp Let's see the simple example of JSP where we are using the script let tag
to put Java code in the JSP page.
We will learn scriptlet tag later.
<html> <body>
<% out.print(2*5); %>
</body> </html>
•javax.servlet.jsp
•javax.servlet.jsp.tagext
javax.servlet.jsp package
•JspPage
•HttpJspPage
Instructor: Ibrahim Yusuf Mohamed(Bulbul)
Copyright © 2018 Pearson Education,
Inc.
1.4 JSP API(application programming interface)
•JspWriter
•PageContext
•JspFactory
•JspEngineInfo
•JspException
•JspError
To use NetBeans for Java programming, you need to first install Java
Development Kit (JDK). See "JDK - How to Install".
Step 1: Download
%CATALINA_HOME%\bin\startup.bat
or
C:\apache-tomcat-5.5.29\bin\startup.bat
15. The environment setup for JSP mainly consists of 3 steps, list of
them.
Any Questions
Thanks For your Listening