01 overview-servlets-and-environment-setup
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

01 overview-servlets-and-environment-setup

on

  • 727 views

 

Statistics

Views

Total Views
727
Views on SlideShare
727
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

01 overview-servlets-and-environment-setup Presentation Transcript

  • 1. 01-Overview-and-Setup
    DhrubojyotiKayal
  • 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
  • 7. Hands On Exercise
  • 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