SlideShare a Scribd company logo
1 of 30
INDUSTRIAL TRAINING
IN
ADVANCED JAVA
Submitted By:-
Adeeba Nadeem
1364110002
C.S-4th
year
ONLINE MUSIC
 INTRODUCTION TO
ORGANIZATION
 INTRODUCTION
• Project Description
• Project Purpose
 SOFTWARE REQUIREMENTS
 INTRODUCTION TO JAVA
 J2EE
 MVC ARCHITECTURE
 JAVA SERVER PAGES
 JAVA BEANS
Contents
Contents
 SERVLETS
 SERVLETS AND JSP
 HOW SERVLETS WORKS?
• Servlet API
• Servlet Interface
• Servlet Life Cycle
• Cookies & Session
 CREATING A SIMPLE SERVLET
 JDBC
 Conclusions
 References
IntRoDUCtIon to oRGAnIZAtIon
A subsidiary of TATA CONSULTANCY SERVICES LIMITED
(TCS Ltd), one of the world’s leading information technology
consulting, services and business process outsourcing
organizations. CMC execute large and complex turnkey projects
and have built, managed and supported our customers IT
systems across the value chain infrastructure, applications and
business processes.
PRojeCt DesCRIPtIon
The purpose of this project is to:
The E-Music World application is an Online Website for an
Organization. It is a virtual showcase for different types of
products like FILM, GHAZHAL,POP, DEVOTIONAL , and
ROCK, CLASSICAL,FOLK etc.
IntRoDUCtIon
PRojeCt PURPose
• The main aim of this project is to play Online music and very
easily with free of cost.
• The project “E-Music” after being tested and was found to
overcoming all the problems of the existing system. The
system is found to be error free and ready for implementation.
FOLLOWING ARE THE FEATURES OF
THIS PROJECT:
•Login, View all Songs Request
•Upload/delete Songs
•Login, View , play a list of Songs
•Track song request history
SOFTWARE REQUIRMENTS
• Operating System: Windows 7 or above
• Front End: HTML & JAVA SCRIPT,J2EE(JSPs, Servlets )
• Web Server: Apache Tomcat 8.0.35/Glassfish
• Back End : Oracle
• Tools Used: My eclipse/Eclipse/Net Beans
INTRODUCTION TO JAVA
• Java is a programming language initially developed by Sun
Microsystems and released as a principal component of Sun
Microsystems Java Platform. Although the language gets
much of its syntax from C and C++.
• It has a less complicated object model and lesser low-level
services. Java applications are typically compiled to byte code
(class file) that can run on any Java Virtual Machine (JVM)
regardless of computer architecture. Java is a general purpose,
object –oriented language that is specially designed to have a
few implementation dependencies as possible.
• Java is currently one of the most standard programming
languages in use, and is extensively used from application
software to web applications.
J2EE
• Short for Java 2 Platform Enterprise Edition,J2EE is a
platform independent, Java centric environment from Sun for
developing and deploying web based enterprise applications
online. The J2EE platform consist of a services, APIs, and
protocols that provide the functionality multitier, Web-based
applications
• Some of the key features and services of J2EE-
• At the client tier, J2EE supports pure HTML, as well as Java
applets or applications. It relies on Java Server Pages and
Servlet code to create HTML or other formatted data for the
client.
• Enterprise Java Beans (EJBs) provide another layer where the
platform’s logic is stored. An EJB server provides functions
such as threading, Concurrency, Security, and memory
management. These Services are transparent to the author.
MVC ARCHITECTURE
• Model-View –Controller (MVC) is an architecture tat separates the
representation of information from the user’s interface with it. The mode
consists of application data and business rules, and the controller mediates
input, converting it to commands for the model or view. A view can be
any output representation data ,such as chart or a diagram. Multiple views
of the same data are possible, such as a pie chart for management and a
tabular view for accountants .The central idea behind MVC is code
reusability and separation of concerns.
JAVA SERVER PAGES
• Java Server Pages(JSP) is technology that helps software
developers create dynamically generated web pages based on
HTML, XML, or other document types. Released in 1999 by
Sun Microsystems. JSP is similar to PHP, but it uses the Java
programming language.
• To deploy and run Java Server Pages, a compatible web server
with a servlet container, such as Apache Tomcat or Jetty is
required.
• Java Server pages is a technology which permits software
developers to create dynamic request like HTML, XML in
order to answer to client request in the net. The syntax in Java
Server Pages includes a supplementary XML tag which is
known as JSP actions.
JAVA BEANS
• Java Beans are reusable software components for Java that can
be manipulated visually in a builder tool. Practically ,they are
classes written in the Java Programming language conforming
to a particular convection. They are used to encapsulate many
objects into a single object (the bean) so that they can be
passed around as a single bean object instead of as multiple
individual objects. A Java Bean is a Java Object that is
serializable, has a null constructor, and allows access to
properties using getter and setter methods.
SERVLETS
• When we run small Java programs within a browser these are
referred to as Applets. . .
• so we run small Java programs within a server these are “
Servlet ”
• A servlet is a program designed to process a client request
(which requires interactivity).
– It processes arguments and formats its results as a short
lived document.
• HTML servlets are becoming a popular mechanism for
creating interactive servers.
SERVLETS AND JSP
• Java Server Pages is an extension to the servlets API.
• With conventional servlets you embed the HTML that you
need inside a Java program.
• With JSP you embed your Java program within a HTML
document (by using special tags).
• Works rather like JavaScript but the JSP script runs on the
server before the page is dispatched to the user’s browser.
HOW SERVLET WORKS?
THE JAVA SERVLET API
•The Java Servlet API is a set of Java classes which define a
standard interface between a Web client and a Web servlet.
Client requests are made to the Web server, which then invokes
the servlet to service the request through this interface.
•The API is composed of two packages:
•Java x .servlet
•Java x. Servlet .http
•The Servlet interface class is the central abstraction of the Java
Servlet API. This class defines the methods which servlets must
implement including a service() method for the handling of
requests.
SERVLET INTERFACE
• The Servlet interface class is the central abstraction of the Java
Servlet API. This class defines the methods which servlets
must implement including a service() method for the handling
of requests.
• The generic Servlet class implements this interface, and
defines a generic , protocol- independent servlet.
• To write an HTTP servlet for use on the web , we will use an
even more specialized class of GenericServlet called Http
Servlet. Http Servlet provides additional methods for the
processing of HTTP requests such as GET(do Get Method)
and POST (do post method). Although our servlets may
implement a service method, in most cases we will implement
the HTTP specific request handling methods of doGet and
doPost.
SERVLETS LIFE CYCLE
The life cycle of a servlet can be categorized into four
parts:
•Loading and Instantiation: The servlet container loads the
servlet during startup or when the first request is made. The
loading of the servlet depends on the attribute <load on startup>
of web.xml file. If the attribute <load on startup> has a positive
value then the servlet is load with loading of the container
otherwise it load when the first request comes for service. After
loading of the servlet, the container creates the instances of the
servlet.
• Initialization: After creating the instances, the servlet container
calls the init() method and passes the servlet initialization
parameters to the init() method. The Init() method is called only
once throughout the life cycle of the servlet. The servlet will be
available for service if it is loaded successfully otherwise the
servlet container unloads the servlet.
• Destroying the Servlet: If the servlet is no longer needed for
servicing any request, the servlet container calls the destroy()
method. Like the init() method this method is also called only
once throughout the life cycle of the servlet. Calling the destroy()
method indicates to the servlet container not to sent the any
request for service and the servlet releases all the resources
associated with it. Java Virtual Machine claims for the memory
associated with the resources for garbage collection.
COOKIES & SESSIONS
COOKIE
•A Cookie is a small piece of text stored on a user’s computer by
their browser. Common uses for cookies are authentication,
storing of site preferences, shopping cart items, and server
session identification.
•Only the cookies stored by the browser that relate to the domain
in the requested URL will be sent to the server.
•In essence , a cookie is a great way of linking one page to the
next for a user’s interaction with the web site or wenb application
SESSION
• A Session can be defined as a server-side storage of
information that is desired to persist throughout the user’s
interaction with the web site or web application.
CrEatINg a SImplE SErvlEt
• Servlets are written in a similar fashion to applets
– Write a new servlet class which extends
javax.servlet.http.HttpServlet (or just implements
javax.servlet.Servlet)
– Override certain methods to deal with requests
– Get your methods to create an HTML document to return
information to the client’s browser
– Load the servlet byte codes onto your web server (for
example apache/jserv)
JDBC
• The Java Database Connectivity (JDBC). API is the industry
standard for database –Independent connectivity between the
Java Programming language and a wide range of databases –
SQL databases and other tabular data sources, such as
spreadsheets or flat files. The JDBC API provides a call-level
API for SQL – based database access.
• JDBC technology allows you to use the programming
language to exploit” Write Once, Runs Anywhere” capabilities
for applications that require access to enterprise data. With a
JDBC technology enabled driver, you can connect all
corporate data even in a heterogeneous environment.
CONClUSIONS
• An E Music library is a project developed in Java to manage
your music store. User can login, Register and creates its own
music library, add songs, request to upload songs to
administrator. The main aim of creating this Online Music Store
System Java based web application is to provide user friendly
tool for music web sites.
rEFErENCES
• For information about HTML try http://www.w3schools.com
• You can download Sun’s servlet development kit from their
web site at the http://java.sun.com/products/servlet
• You can download apache’s Tomcat server from
http://jakarta.apache.org
• For other information about Servlet development try
http://www.servlets.com
THANK YOU

More Related Content

What's hot

Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web development
bethanygfair
 

What's hot (20)

Full stack web development
Full stack web developmentFull stack web development
Full stack web development
 
Ppt full stack developer
Ppt full stack developerPpt full stack developer
Ppt full stack developer
 
Web Development
Web DevelopmentWeb Development
Web Development
 
Full Stack Web Development
Full Stack Web DevelopmentFull Stack Web Development
Full Stack Web Development
 
Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1
 
The Full Stack Web Development
The Full Stack Web DevelopmentThe Full Stack Web Development
The Full Stack Web Development
 
Web Development on Web Project Report
Web Development on Web Project ReportWeb Development on Web Project Report
Web Development on Web Project Report
 
Web Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScriptWeb Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScript
 
Web Development on Web Project Presentation
Web Development on Web Project PresentationWeb Development on Web Project Presentation
Web Development on Web Project Presentation
 
Front end web development
Front end web developmentFront end web development
Front end web development
 
WEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentWEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web Development
 
Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web development
 
Ngo management system.
Ngo management system.Ngo management system.
Ngo management system.
 
Introduction to Web development
Introduction to Web developmentIntroduction to Web development
Introduction to Web development
 
Web development ppt
Web development pptWeb development ppt
Web development ppt
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Front-End Web Development
Front-End Web DevelopmentFront-End Web Development
Front-End Web Development
 
How To be a Backend developer
How To be a Backend developer    How To be a Backend developer
How To be a Backend developer
 
Library management system
Library management systemLibrary management system
Library management system
 

Viewers also liked (8)

Independent Research
Independent ResearchIndependent Research
Independent Research
 
Dissertation final report
Dissertation final reportDissertation final report
Dissertation final report
 
Face detection presentation slide
Face detection  presentation slideFace detection  presentation slide
Face detection presentation slide
 
Face Detection and Recognition System
Face Detection and Recognition SystemFace Detection and Recognition System
Face Detection and Recognition System
 
Detection and recognition of face using neural network
Detection and recognition of face using neural networkDetection and recognition of face using neural network
Detection and recognition of face using neural network
 
Week6 face detection
Week6 face detectionWeek6 face detection
Week6 face detection
 
Face recognition technology - BEST PPT
Face recognition technology - BEST PPTFace recognition technology - BEST PPT
Face recognition technology - BEST PPT
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
 

Similar to Ppt for Online music store

Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and Servlets
Raghu nath
 

Similar to Ppt for Online music store (20)

WEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptxWEB TECHNOLOGY Unit-3.pptx
WEB TECHNOLOGY Unit-3.pptx
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
192563547-Servletsjhb,mnjhjhjm,nm,-Pres-ppt.ppt
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
Servlets api overview
Servlets api overviewServlets api overview
Servlets api overview
 
Servlet.pptx
Servlet.pptxServlet.pptx
Servlet.pptx
 
Servlet.pptx
Servlet.pptxServlet.pptx
Servlet.pptx
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
Java Training in Chennai
Java Training in Chennai Java Training in Chennai
Java Training in Chennai
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
4. J2EE.pptx
4. J2EE.pptx4. J2EE.pptx
4. J2EE.pptx
 
Devjyotippt
DevjyotipptDevjyotippt
Devjyotippt
 
JEE Course - The Web Tier
JEE Course - The Web TierJEE Course - The Web Tier
JEE Course - The Web Tier
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and Servlets
 
Advance java1.1
Advance java1.1Advance java1.1
Advance java1.1
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 
JAVA
JAVAJAVA
JAVA
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 

Recently uploaded (20)

UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 

Ppt for Online music store

  • 1. INDUSTRIAL TRAINING IN ADVANCED JAVA Submitted By:- Adeeba Nadeem 1364110002 C.S-4th year
  • 3.  INTRODUCTION TO ORGANIZATION  INTRODUCTION • Project Description • Project Purpose  SOFTWARE REQUIREMENTS  INTRODUCTION TO JAVA  J2EE  MVC ARCHITECTURE  JAVA SERVER PAGES  JAVA BEANS Contents
  • 4. Contents  SERVLETS  SERVLETS AND JSP  HOW SERVLETS WORKS? • Servlet API • Servlet Interface • Servlet Life Cycle • Cookies & Session  CREATING A SIMPLE SERVLET  JDBC  Conclusions  References
  • 5. IntRoDUCtIon to oRGAnIZAtIon A subsidiary of TATA CONSULTANCY SERVICES LIMITED (TCS Ltd), one of the world’s leading information technology consulting, services and business process outsourcing organizations. CMC execute large and complex turnkey projects and have built, managed and supported our customers IT systems across the value chain infrastructure, applications and business processes.
  • 6. PRojeCt DesCRIPtIon The purpose of this project is to: The E-Music World application is an Online Website for an Organization. It is a virtual showcase for different types of products like FILM, GHAZHAL,POP, DEVOTIONAL , and ROCK, CLASSICAL,FOLK etc.
  • 8. PRojeCt PURPose • The main aim of this project is to play Online music and very easily with free of cost. • The project “E-Music” after being tested and was found to overcoming all the problems of the existing system. The system is found to be error free and ready for implementation.
  • 9. FOLLOWING ARE THE FEATURES OF THIS PROJECT: •Login, View all Songs Request •Upload/delete Songs •Login, View , play a list of Songs •Track song request history
  • 10. SOFTWARE REQUIRMENTS • Operating System: Windows 7 or above • Front End: HTML & JAVA SCRIPT,J2EE(JSPs, Servlets ) • Web Server: Apache Tomcat 8.0.35/Glassfish • Back End : Oracle • Tools Used: My eclipse/Eclipse/Net Beans
  • 11. INTRODUCTION TO JAVA • Java is a programming language initially developed by Sun Microsystems and released as a principal component of Sun Microsystems Java Platform. Although the language gets much of its syntax from C and C++. • It has a less complicated object model and lesser low-level services. Java applications are typically compiled to byte code (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general purpose, object –oriented language that is specially designed to have a few implementation dependencies as possible. • Java is currently one of the most standard programming languages in use, and is extensively used from application software to web applications.
  • 12. J2EE • Short for Java 2 Platform Enterprise Edition,J2EE is a platform independent, Java centric environment from Sun for developing and deploying web based enterprise applications online. The J2EE platform consist of a services, APIs, and protocols that provide the functionality multitier, Web-based applications • Some of the key features and services of J2EE- • At the client tier, J2EE supports pure HTML, as well as Java applets or applications. It relies on Java Server Pages and Servlet code to create HTML or other formatted data for the client. • Enterprise Java Beans (EJBs) provide another layer where the platform’s logic is stored. An EJB server provides functions such as threading, Concurrency, Security, and memory management. These Services are transparent to the author.
  • 13. MVC ARCHITECTURE • Model-View –Controller (MVC) is an architecture tat separates the representation of information from the user’s interface with it. The mode consists of application data and business rules, and the controller mediates input, converting it to commands for the model or view. A view can be any output representation data ,such as chart or a diagram. Multiple views of the same data are possible, such as a pie chart for management and a tabular view for accountants .The central idea behind MVC is code reusability and separation of concerns.
  • 14.
  • 15. JAVA SERVER PAGES • Java Server Pages(JSP) is technology that helps software developers create dynamically generated web pages based on HTML, XML, or other document types. Released in 1999 by Sun Microsystems. JSP is similar to PHP, but it uses the Java programming language. • To deploy and run Java Server Pages, a compatible web server with a servlet container, such as Apache Tomcat or Jetty is required. • Java Server pages is a technology which permits software developers to create dynamic request like HTML, XML in order to answer to client request in the net. The syntax in Java Server Pages includes a supplementary XML tag which is known as JSP actions.
  • 16. JAVA BEANS • Java Beans are reusable software components for Java that can be manipulated visually in a builder tool. Practically ,they are classes written in the Java Programming language conforming to a particular convection. They are used to encapsulate many objects into a single object (the bean) so that they can be passed around as a single bean object instead of as multiple individual objects. A Java Bean is a Java Object that is serializable, has a null constructor, and allows access to properties using getter and setter methods.
  • 17. SERVLETS • When we run small Java programs within a browser these are referred to as Applets. . . • so we run small Java programs within a server these are “ Servlet ” • A servlet is a program designed to process a client request (which requires interactivity). – It processes arguments and formats its results as a short lived document. • HTML servlets are becoming a popular mechanism for creating interactive servers.
  • 18. SERVLETS AND JSP • Java Server Pages is an extension to the servlets API. • With conventional servlets you embed the HTML that you need inside a Java program. • With JSP you embed your Java program within a HTML document (by using special tags). • Works rather like JavaScript but the JSP script runs on the server before the page is dispatched to the user’s browser.
  • 19. HOW SERVLET WORKS? THE JAVA SERVLET API •The Java Servlet API is a set of Java classes which define a standard interface between a Web client and a Web servlet. Client requests are made to the Web server, which then invokes the servlet to service the request through this interface. •The API is composed of two packages: •Java x .servlet •Java x. Servlet .http •The Servlet interface class is the central abstraction of the Java Servlet API. This class defines the methods which servlets must implement including a service() method for the handling of requests.
  • 20. SERVLET INTERFACE • The Servlet interface class is the central abstraction of the Java Servlet API. This class defines the methods which servlets must implement including a service() method for the handling of requests. • The generic Servlet class implements this interface, and defines a generic , protocol- independent servlet. • To write an HTTP servlet for use on the web , we will use an even more specialized class of GenericServlet called Http Servlet. Http Servlet provides additional methods for the processing of HTTP requests such as GET(do Get Method) and POST (do post method). Although our servlets may implement a service method, in most cases we will implement the HTTP specific request handling methods of doGet and doPost.
  • 21. SERVLETS LIFE CYCLE The life cycle of a servlet can be categorized into four parts: •Loading and Instantiation: The servlet container loads the servlet during startup or when the first request is made. The loading of the servlet depends on the attribute <load on startup> of web.xml file. If the attribute <load on startup> has a positive value then the servlet is load with loading of the container otherwise it load when the first request comes for service. After loading of the servlet, the container creates the instances of the servlet.
  • 22. • Initialization: After creating the instances, the servlet container calls the init() method and passes the servlet initialization parameters to the init() method. The Init() method is called only once throughout the life cycle of the servlet. The servlet will be available for service if it is loaded successfully otherwise the servlet container unloads the servlet. • Destroying the Servlet: If the servlet is no longer needed for servicing any request, the servlet container calls the destroy() method. Like the init() method this method is also called only once throughout the life cycle of the servlet. Calling the destroy() method indicates to the servlet container not to sent the any request for service and the servlet releases all the resources associated with it. Java Virtual Machine claims for the memory associated with the resources for garbage collection.
  • 23.
  • 24. COOKIES & SESSIONS COOKIE •A Cookie is a small piece of text stored on a user’s computer by their browser. Common uses for cookies are authentication, storing of site preferences, shopping cart items, and server session identification. •Only the cookies stored by the browser that relate to the domain in the requested URL will be sent to the server. •In essence , a cookie is a great way of linking one page to the next for a user’s interaction with the web site or wenb application
  • 25. SESSION • A Session can be defined as a server-side storage of information that is desired to persist throughout the user’s interaction with the web site or web application.
  • 26. CrEatINg a SImplE SErvlEt • Servlets are written in a similar fashion to applets – Write a new servlet class which extends javax.servlet.http.HttpServlet (or just implements javax.servlet.Servlet) – Override certain methods to deal with requests – Get your methods to create an HTML document to return information to the client’s browser – Load the servlet byte codes onto your web server (for example apache/jserv)
  • 27. JDBC • The Java Database Connectivity (JDBC). API is the industry standard for database –Independent connectivity between the Java Programming language and a wide range of databases – SQL databases and other tabular data sources, such as spreadsheets or flat files. The JDBC API provides a call-level API for SQL – based database access. • JDBC technology allows you to use the programming language to exploit” Write Once, Runs Anywhere” capabilities for applications that require access to enterprise data. With a JDBC technology enabled driver, you can connect all corporate data even in a heterogeneous environment.
  • 28. CONClUSIONS • An E Music library is a project developed in Java to manage your music store. User can login, Register and creates its own music library, add songs, request to upload songs to administrator. The main aim of creating this Online Music Store System Java based web application is to provide user friendly tool for music web sites.
  • 29. rEFErENCES • For information about HTML try http://www.w3schools.com • You can download Sun’s servlet development kit from their web site at the http://java.sun.com/products/servlet • You can download apache’s Tomcat server from http://jakarta.apache.org • For other information about Servlet development try http://www.servlets.com