CONTENTS
1. Introduction to Project
2. Introduction to JSP
3. Why use JSP/Advantages
4. Architecture of JSP
5. Life Cycle of JSP.
6. Similarity between JSP & servlet
7. Difference between JSP & Servlet
8. Introduction to MySQL
9. Introduction to HTML, CSS and JavaScript.
Project First presentation about introduction to technologies to be used
1. • Arya Kumar Yadav
• Harihar Mahto
• Deepak Vishwakarma
Project First Presentation Of Technologies to be used
2. • 1. Introduction to Project
• 2. Introduction to JSP
• 3. Why use JSP/Advantages
• 4. Architecture of JSP
• 5. Life Cycle of JSP.
• 6. Similarity between JSP & servlet
• 7. Difference between JSP & Servlet
• 8. Introduction to MySQL
• 9. Introduction to HTML, CSS and JavaScript.
3. • Project Name:
Online Payment System
• Technologies to be used:
Programming language:
Java
Front-end:
JSP, HTML, CSS, JavaScript
Back-end:
Database: MySQL
Server: Apache Tomcat
• Operating System:
Windows 8
4. • It is a technology for developing web pages that support
dynamic content .
• It helps developers insert java code in HTML pages by
making use of special JSP tags .
• Using JSP, we can collect input from users through web
page forms, present records from a database and create
web pages dynamically.
• JSP is an integral part of J2EE, this means that JSP can
play a part in the simplest applications to the most
complex and demanding.
5. • vs. Active ServerPages : First, the dynamic part is written in
Java, not Visual Basic or other MS specific language, so it is
more powerful and easier to use. Second, it is portable to
other operating systems and non-Microsoft Web servers.
• vs. Pure Servlets: It is more convenient to write (and to
modify!) regular HTML than to have plenty of println()
statements.
• vs. JavaScript: JavaScript can generate HTML dynamically on
the client but can hardly interact with the web server to
perform complex tasks like database access and image
processing etc.
• vs. Static HTML: Regular HTML, of course, cannot contain
dynamic information.
6.
7. • Browser sends an HTTP request to the web server.
• The web server recognizes that the HTTP request is for a
JSP page and forwards it to a JSP engine.
• The JSP engine loads the JSP page from disk and
converts it into a servlet content.
• This conversion is very simple in which all template text is
converted to println( ) statements and all JSP elements
are converted to Java code that implements the
corresponding dynamic behaviour of the page.
8. • The JSP engine compiles the servlet into an executable
class and forwards the original request to a servlet
engine .
• The JSP engine compiles the servlet into an executable
class and forwards the original request to a servlet
engine .
• The web server forwards the HTTP response to your
browser in terms of static HTML content.
• Finally web browser handles the dynamically generated
HTML page inside the HTTP response exactly as if it
were a static page.
9. • A JSP life cycle can be defined as the entire process
from its creation till the destruction which is similar to a
servlet life cycle with an additional step which is required
to compile a JSP into servlet.
The following are the paths followed by a JSP
• Compilation
• Initialization
• Execution
• Clean-Up
10. When a browser asks for a JSP, the JSP engine first
checks to see whether it needs to compile the page. If the
page has never been compiled, or if the JSP has been
modified since it was last compiled, the JSP engine
compiles the page.
•The compilation process involves three steps:
• Parsing the JSP.
• Turning the JSP into a servlet.
• Compiling the servlet.
11. • When a container loads a JSP it invokes the jspInit()
method before servicing any requests .
• We generally initialize database connections, open files,
and create lookup tables in the jspInit() method.
public void jspInit() {
//Initialization code
}
12. • The _jspService() method of a JSP is invoked once per a
request.
• Whenever a browser requests a JSP and the page has
been loaded and initialized, the JSP engine invokes the
_jspService() method in the JSP.
• is responsible for generating the response for requests
and is also responsible for generating responses to all
seven of the HTTP methods i.e. GET, POST, DELETE
etc.
void _jspService ( HttpServletRequest request ()
, HttpServletResponse response() )
{
//Service handling code
}
13. • It is the destruction phase of the JSP life cycle represents
when a JSP is being removed from use by a container .
• This method is equivalent of the destroy method for
servlets.
• It is called when we need to perform any clean-up, such
as releasing database connections or closing open files.
public void jspDestroy()
{
//clean-up code
}
14. • A JSP page , after compilation , generates a servlet and
therefore incorporates all servlet functionalities
• Servlets and JSP thus share common features, such as platform
independence , creation of database-driven Web applications ,
and server side programming capabilities.
15. • Servlets tie up files (an HTML file for the static content
and a Java file for the dynamic contents) to
independently handle the static presentation logic and the
dynamic business logic .
• Due to this , a change made to any file requires
recompilation of the servlet .
• JSP on the other hand allows Java to be embedded
directly into an HTML page by using tags .
• Any changes made to HTML content is automatically
compiled and loaded onto the servlet.
16. • It is a open source relational data base management
system that uses Structured Query Language (SQL).
• It provides us a secure environment for storing
maintaining and accessing data.
• MySQL was invented by Michael Widenius.
• IT was created by MySQL AB, a company based in
Sweden.
• In 2009 it was adopted by Oracle corporation.
17. • Speed: Sports clustered server for demanding
applications.
• Ease of Use
• Cost: Available free of cost, It is a part of LAMP
environment, an open source enterprise.
• Query language support.
• Portability: Can work one different platforms
• Data types: supports, fixed length and variable length
record.
• Security: Offers a password system that is flexible and
secure.
• Scalability and limits: Can handle large databases. Some
real life MySQL databases contend 50 million records.
18. MySQL uses SQL command to communicate with the
database to perform specific tasks, work, functions and
queries with data.
SQL commands are grouped into three major
categories depending on their functionality.
•Data Definition Language (DDL) - These SQL commands
are used for creating, modifying, and dropping the structure
of database objects. The commands are CREATE, ALTER,
DROP
etc.
•Data Manipulation Language (DML) - These SQL
commands are used for storing, retrieving, modifying, and
deleting data.
These Data Manipulation Language commands
19. • Transaction Control Language (TCL) - These SQL
commands are used for managing changes affecting the
data. These commands are COMMIT, ROLLBACK, and
SAVEPOINT.
20. • Stands for Hypertext Mark Up Language.
• Creates static web pages using HTML tags.
• Developed by Tim Berners Lee.
• HTML documents are described by HTML tags.
• Each HTML tag describes different document content.
• In addition with CSS and JavaScript it is called DHTL.
• It is not case sensitive.
• HTML 5 is latest versions.
• Web browsers renders HTML pages.
21.
22. • JavaScript is a dynamic computer programming
language. It is lightweight and most commonly used as a
part of web pages, whose implementations allow client-
side script to interact with the user and make dynamic
pages. It is an interpreted programming language with
object-oriented capabilities.
• JavaScript 2 is the latest version now.
• Syntax of JavaScript
<script type=“text/JavaScript”>
JavaScript code
</script>
23. • Less serverinteraction: You can validate user input
before sending the page off to the server. This saves
server traffic, which means less load on your server.
• Immediate feedbackto the visitors: They don't have to
wait for a page reload to see if they have forgotten to
enter something.
• Increased interactivity: You can create interfaces that
react when the user hovers over them with a mouse or
activates them via the keyboard.
• Richerinterfaces: You can use JavaScript to include
such items as drag and-drop components and sliders to
give a Rich Interface to your site visitors.
24. • Cascading Style Sheets handles the look and feel part of
a web page.
• Using CSS, we can control the
• colour of the text,
• the style of fonts,
• the spacing between paragraphs
• background images or colours .
25. • CSS saves time - You can write CSS once and then
reuse the same sheet in multiple HTML pages. You can
define a style for each HTML element and apply it to as
many web pages as you want.
• Pages load faster - If you are using CSS, you do not
need to write HTML tag attributes every time. Just write
one CSS rule of a tag and apply it to all the occurrences
of that tag. So, less code means faster download times.
• Easy maintenance - To make a global change, simply
change the style, and all the elements in all the web
pages will be updated automatically.
• Superiorstyles to HTML - CSS has a much wider array
of attributes than HTML, so you can give a far better look
to your HTML page in comparison to HTML attributes.