SlideShare uma empresa Scribd logo
1 de 13
01-Overview-and-Setup DhrubojyotiKayal
Introducing Servlets Installing Tomcat  Installing Eclipse Your first Java web application Your first Servlet Agenda
Static HTML is so boring! – Dynamic content with Servlets A Java program that runs on a server.  Follows a standard specification. Standard way to register servlet. Current version 3.0 (JSR 315) We focus on 2.5 (JSR 154) as 3.0 is very new Server forwards incoming request – headers, form data to registered servlet based on URL. Servlet processes data, generates new data and passes back to the server which in turn forwards it to the browser What is a servlet?
In Action Servlet RDBMS Browser Servlet Server JVM
Efficient Uses threads not OS processes, one servlet instance Convenient High level utility functions Powerful Data processing, pooling, persistence Portable Runs on any OS where you get JVM Inexpensive Best in class open source servers to run servlets Advantages
Secure No hazards related to process management Popular Most popular use of Java technology Medium for large web apps of the scale of Google search  Supported by Apache, IBM, Oracle, Jetty, Coucho ….. Runs on Windows, Unix, MacOS, VMS, IBM Mainframe OS Used for All kinds of applications – airline, hotels, banking, insurance ….. Advantages
Hands On Exercise
Java web server Servlet reference implementation http://tomcat.apache.org Tomcat 7 – Servlet 3 Tomcat 6 – Servlet 2.5 Download Install Run See the web admin console Shutdown Tomcat
Eclipse IDE (http://www.eclipse.org) Open Source and supported by all biggies in Java business Eclipse 3.5 - Galileo Based on plug-in and OSGi core Few essential plug-ins  Install Eclipse Run Eclipse Shutdown Eclipse Eclipse IDE
Setup new Tomcat 6 server Start Server Stop Server Setup Tomcat on Eclipse
Create workspace Create web application using Eclipse The project structure in Eclipse Need for web.xml Configure Tomcat 6 in Eclipse What is deployed? – war file Structure and contents of a blown up war file Manual deployment on Tomcat Deploy using admin console First Web Application
Ah this web application does nothing Let us create the first servlet on Eclipse What has changed on the web.xml Deploy What changes in the exploded war? Lets send a request for our servlet Hurray it responds First servlet
Q&A

Mais conteúdo relacionado

Mais procurados

Moving to the Cloud with ny times.com
Moving to the Cloud with ny times.comMoving to the Cloud with ny times.com
Moving to the Cloud with ny times.com
bgerst
 

Mais procurados (20)

MesosCon 2017 - OpenWhisk as an Apache Mesos Framework
MesosCon 2017 - OpenWhisk as an Apache Mesos FrameworkMesosCon 2017 - OpenWhisk as an Apache Mesos Framework
MesosCon 2017 - OpenWhisk as an Apache Mesos Framework
 
Moving to the Cloud with ny times.com
Moving to the Cloud with ny times.comMoving to the Cloud with ny times.com
Moving to the Cloud with ny times.com
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
 
Docker presentation for sharing
Docker presentation   for sharingDocker presentation   for sharing
Docker presentation for sharing
 
PHP deploy 2015 flavor - talk from php tour 2015 luxembourg
PHP deploy 2015 flavor - talk from php tour 2015 luxembourgPHP deploy 2015 flavor - talk from php tour 2015 luxembourg
PHP deploy 2015 flavor - talk from php tour 2015 luxembourg
 
Let's Code our Infrastructure!
Let's Code our Infrastructure!Let's Code our Infrastructure!
Let's Code our Infrastructure!
 
Managing Large Selenium Grid
Managing Large Selenium Grid�Managing Large Selenium Grid�
Managing Large Selenium Grid
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migratingWordpress -> Middleman: Lesson learned in the 2-years since migrating
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
 
Decapitating Selenium with JavaScript
Decapitating Selenium with JavaScriptDecapitating Selenium with JavaScript
Decapitating Selenium with JavaScript
 
Install oracle oam web gate on windows
Install oracle oam web gate on windowsInstall oracle oam web gate on windows
Install oracle oam web gate on windows
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
Active mq read and write flow in mule
Active mq  read and write flow in muleActive mq  read and write flow in mule
Active mq read and write flow in mule
 
WebAssembly Fundamentals
WebAssembly FundamentalsWebAssembly Fundamentals
WebAssembly Fundamentals
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentation
 
Micro services architecture and service fabric
Micro services architecture and service fabricMicro services architecture and service fabric
Micro services architecture and service fabric
 
Training Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMITraining Slides: 206 - Using the Tungsten Cluster AMI
Training Slides: 206 - Using the Tungsten Cluster AMI
 
How to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud SolutionsHow to work with Selenium Grid and Cloud Solutions
How to work with Selenium Grid and Cloud Solutions
 
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
 
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutesMule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
 
OWASP CSRF Protector
OWASP CSRF ProtectorOWASP CSRF Protector
OWASP CSRF Protector
 

Destaque

Tak.To.Je.Ona
Tak.To.Je.OnaTak.To.Je.Ona
Tak.To.Je.Ona
venom001
 
Le Rocce Metamorfiche
Le Rocce MetamorficheLe Rocce Metamorfiche
Le Rocce Metamorfiche
matteo58
 
Java servlets
Java servletsJava servlets
Java servlets
lopjuan
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
 

Destaque (19)

Tak.To.Je.Ona
Tak.To.Je.OnaTak.To.Je.Ona
Tak.To.Je.Ona
 
Cipla 20-09-2010
Cipla   20-09-2010Cipla   20-09-2010
Cipla 20-09-2010
 
A Brief History of Conversation: Advertising in the Social Space
A Brief History of Conversation: Advertising in the Social SpaceA Brief History of Conversation: Advertising in the Social Space
A Brief History of Conversation: Advertising in the Social Space
 
Servlets
ServletsServlets
Servlets
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration
 
Seex feet under ibgles
Seex feet under ibglesSeex feet under ibgles
Seex feet under ibgles
 
Le Rocce Metamorfiche
Le Rocce MetamorficheLe Rocce Metamorfiche
Le Rocce Metamorfiche
 
12 encapsulation
12   encapsulation12   encapsulation
12 encapsulation
 
Servlets
ServletsServlets
Servlets
 
Introducción a Tomcat
Introducción a TomcatIntroducción a Tomcat
Introducción a Tomcat
 
Servlets
ServletsServlets
Servlets
 
Servlets
ServletsServlets
Servlets
 
Asd
AsdAsd
Asd
 
Java servlets
Java servletsJava servlets
Java servlets
 
Servlets
ServletsServlets
Servlets
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
JEE Programming - 04 Java Servlets
JEE Programming - 04 Java ServletsJEE Programming - 04 Java Servlets
JEE Programming - 04 Java Servlets
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 

Semelhante a 01 overview-servlets-and-environment-setup

Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
backdoor
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The Basics
Philip Langer
 

Semelhante a 01 overview-servlets-and-environment-setup (20)

OSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration SummitOSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration Summit
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
 
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
The Top 10 Things Oracle UCM Users Need To Know About WebLogicThe Top 10 Things Oracle UCM Users Need To Know About WebLogic
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
 
SHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applicationsSHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applications
 
SHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applicationsSHARE 2014, Pittsburgh CICS and Liberty applications
SHARE 2014, Pittsburgh CICS and Liberty applications
 
JAX London 2015: Java vs Nodejs
JAX London 2015: Java vs NodejsJAX London 2015: Java vs Nodejs
JAX London 2015: Java vs Nodejs
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris Bailey
 
WebLogic for DBAs
WebLogic for DBAsWebLogic for DBAs
WebLogic for DBAs
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The Basics
 
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
 
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...
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed intro
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Scala, Apache Spark, The PlayFramework and Docker in IBM Platform As A Service
Scala, Apache Spark, The PlayFramework and Docker in IBM Platform As A ServiceScala, Apache Spark, The PlayFramework and Docker in IBM Platform As A Service
Scala, Apache Spark, The PlayFramework and Docker in IBM Platform As A Service
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
WebLogic for DBAs 1.0h
WebLogic for DBAs 1.0hWebLogic for DBAs 1.0h
WebLogic for DBAs 1.0h
 
Weblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencastWeblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencast
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 

Mais de dhrubo kayal

Mais de dhrubo kayal (20)

01 session tracking
01   session tracking01   session tracking
01 session tracking
 
03 handling requests
03 handling requests03 handling requests
03 handling requests
 
02 up close with servlets
02 up close with servlets02 up close with servlets
02 up close with servlets
 
19 reflection
19   reflection19   reflection
19 reflection
 
18 concurrency
18   concurrency18   concurrency
18 concurrency
 
17 exceptions
17   exceptions17   exceptions
17 exceptions
 
16 containers
16   containers16   containers
16 containers
 
15 interfaces
15   interfaces15   interfaces
15 interfaces
 
14 initialization & cleanup
14   initialization & cleanup14   initialization & cleanup
14 initialization & cleanup
 
13 inheritance
13   inheritance13   inheritance
13 inheritance
 
11 static
11   static11   static
11 static
 
10 access control
10   access control10   access control
10 access control
 
09 packages
09   packages09   packages
09 packages
 
08 class and object
08   class and object08   class and object
08 class and object
 
07 flow control
07   flow control07   flow control
07 flow control
 
05 operators
05   operators05   operators
05 operators
 
04 data types & variables
04   data types & variables04   data types & variables
04 data types & variables
 
03 hello world with java
03   hello world with java03   hello world with java
03 hello world with java
 
02 what is java
02   what is java02   what is java
02 what is java
 
01 handshake
01   handshake01   handshake
01 handshake
 

01 overview-servlets-and-environment-setup

  • 2. Introducing Servlets Installing Tomcat Installing Eclipse Your first Java web application Your first Servlet Agenda
  • 3. Static HTML is so boring! – Dynamic content with Servlets A Java program that runs on a server. Follows a standard specification. Standard way to register servlet. Current version 3.0 (JSR 315) We focus on 2.5 (JSR 154) as 3.0 is very new Server forwards incoming request – headers, form data to registered servlet based on URL. Servlet processes data, generates new data and passes back to the server which in turn forwards it to the browser What is a servlet?
  • 4. In Action Servlet RDBMS Browser Servlet Server JVM
  • 5. Efficient Uses threads not OS processes, one servlet instance Convenient High level utility functions Powerful Data processing, pooling, persistence Portable Runs on any OS where you get JVM Inexpensive Best in class open source servers to run servlets Advantages
  • 6. Secure No hazards related to process management Popular Most popular use of Java technology Medium for large web apps of the scale of Google search Supported by Apache, IBM, Oracle, Jetty, Coucho ….. Runs on Windows, Unix, MacOS, VMS, IBM Mainframe OS Used for All kinds of applications – airline, hotels, banking, insurance ….. Advantages
  • 8. Java web server Servlet reference implementation http://tomcat.apache.org Tomcat 7 – Servlet 3 Tomcat 6 – Servlet 2.5 Download Install Run See the web admin console Shutdown Tomcat
  • 9. Eclipse IDE (http://www.eclipse.org) Open Source and supported by all biggies in Java business Eclipse 3.5 - Galileo Based on plug-in and OSGi core Few essential plug-ins Install Eclipse Run Eclipse Shutdown Eclipse Eclipse IDE
  • 10. Setup new Tomcat 6 server Start Server Stop Server Setup Tomcat on Eclipse
  • 11. Create workspace Create web application using Eclipse The project structure in Eclipse Need for web.xml Configure Tomcat 6 in Eclipse What is deployed? – war file Structure and contents of a blown up war file Manual deployment on Tomcat Deploy using admin console First Web Application
  • 12. Ah this web application does nothing Let us create the first servlet on Eclipse What has changed on the web.xml Deploy What changes in the exploded war? Lets send a request for our servlet Hurray it responds First servlet
  • 13. Q&A