JSP Presentation
JSP Presentation
An Overview
Scope
Need of dynamic pages
History of dynamic pages
Servlets & its example
JSP Overview
JSP: Architecture & Life cycle
JSP: Tags & Example
JavaBeans
Comparison of JSP with other server-side scripting
technologies.
Pros and Cons of JSP
References
3
Performance bottlenecks
Servlets
It is regular Java code. There are new APIs, but no new syntax.
It has unfamiliar import statements. The servlet and JSP APIs
are separate specification (and are also part of the Java 2
Platform, Enterprise Edition—J2EE).
It extends a standard class (HttpServlet). Servlets provide a
rich infrastructure for dealing with HTTP.
It overrides the doGet method. Servlets have different methods
to respond to different types of HTTP commands.
Servlet Life Cycle: It consist of followings
The Init method
JSP Overview
Architecture
9
JSP - Tags
JSP - Example
JavaBeans
A JavaBean is a Java Class file that comes with
specifications.
Defines how to create an Object, retrieve and set properties
of the Object
It is used to minimize the java code in JSP.
They are is used to communicate with Database & contain
various logic.
Syntax: <jsp:useBean id=Bean name class=bean class
scope=page/request/session/application/>
Syntax for setting value: <jsp:setProperty name=bean
name property=someProperty value=someValue/>
13
Comparison of JSP
PHP Cold Fusion ASP JSP
JavaBeans,
Component COM, Java classes COM, CORBA,
COM components Enterprise
Support (version 4) JavaBeans
JavaBeans
Medium (VBScript,
Learning curve High (C, Perl) Low High (Java)
JScript)
15
References
www.java.sun.com/products/jsp/
www.java.sun.com/developer/technicalArticles/Programming/jsp/
www.en.wikipedia.org/wiki/JavaServerPages
www.visualbuilder.com/jsp/tutorial
www.cetus-links.org/oo_javaserver_pages.html
www.jspin.com
www.courses.coreservlets.com
www.onjava.com/topics/java/JSP_Servlets
18
Thank You
Any Questions?