Introduction to Java Web Programming Gregg Sporar - - PowerPoint PPT Presentation

introduction to java web programming
SMART_READER_LITE
LIVE PREVIEW

Introduction to Java Web Programming Gregg Sporar - - PowerPoint PPT Presentation

Introduction to Java Web Programming Gregg Sporar gregg.sporar@sun.com Agenda What is Java? Web/Application Servers Servlets JSPs Java Web Frameworks JavaServer Faces Beyond the Java Language 2 What is Java?


slide-1
SLIDE 1

Introduction to Java Web Programming

Gregg Sporar gregg.sporar@sun.com

slide-2
SLIDE 2

2

Agenda

  • What is Java?
  • Web/Application Servers
  • Servlets
  • JSPs
  • Java Web Frameworks
  • JavaServer Faces
  • Beyond the Java Language
slide-3
SLIDE 3

3

What is Java?

  • Runs Everywhere
  • and Open Source

FREE

slide-4
SLIDE 4

4

Java Flavors

Optional Packages

Java Enterprise Edition (Java EE) Java Standard Edition (Java SE)

JVM

Java Card APIs CardVM

Optional Packages

Personal Basis Profile Personal Profile

Foundation Profile CDC MIDP CLDC KVM

Java Micro Edition (Java ME)

slide-5
SLIDE 5

5

“Hello World” in Java

slide-6
SLIDE 6

6

A Specification...

slide-7
SLIDE 7

7

Web/Application Servers

Client Client Client Client Client

Client Tier Enterprise Information Tier Middle Tier

Enterprise Information Systems (EIS):

Relational Database, Legacy Applications, ERP Systems

Enterprise JavaBeans™ Enterprise JavaBeans Other Services: JNDI, JMS, JavaMail™

Java EE Application Server

Web Server JSP, Servlets

Firewall

HTML/XML

slide-8
SLIDE 8

8

Web/Application Servers

  • Open Source
  • Tomcat
  • JBoss
  • Geronimo
  • GlassFish
  • Proprietary
  • WebSphere
  • WebLogic
  • OC4J
slide-9
SLIDE 9

9

What is a Servlet?

A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request- response programming model.

slide-10
SLIDE 10

10

Servlet Processing

slide-11
SLIDE 11

11

“Hello World” Java Servlet

slide-12
SLIDE 12

12

Servlet Deployment

slide-13
SLIDE 13

13

“Hello World” Revisited...

Not Very Robust....

slide-14
SLIDE 14

14

What is a JSP?

JavaServer Page: A JSP page is a text-based document that contains two types of text:

static template data, which can be expressed in any text-based format, such as HTML, SVG, WML, and XML; ...and... JSP elements, which construct dynamic content.

slide-15
SLIDE 15

15

“Hello World” with a JSP

slide-16
SLIDE 16

16

You Might Be Wondering...

Why does the code do so much grunt work?

slide-17
SLIDE 17

17

Java Web Frameworks

  • Struts
  • Tapestry
  • Wicket
  • Stripes
  • Spring MVC
  • Google Web Toolkit
  • JavaServer Faces (JSF)
  • etc...
slide-18
SLIDE 18

18

What is JavaServer Faces?

JavaServer Faces technology includes: * A set of APIs for representing UI

components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility. * A JavaServer Pages (JSP) custom tag library for expressing a JavaServer Faces interface within a JSP page.

slide-19
SLIDE 19

19

“Hello World” with JSF

slide-20
SLIDE 20

20

“Hello World” with JSF (cont'd)

slide-21
SLIDE 21

21

“Hello World” with JSF (cont'd)

slide-22
SLIDE 22

22

“Hello World” with JSF (cont'd)

slide-23
SLIDE 23

23

JSF Life cycle

Source: JSF for nonbelievers, by Rick Hightower

slide-24
SLIDE 24

24

Beyond the Java Language

Devices

Development

and more...

The Virtual Machine

JavaFX Script

slide-25
SLIDE 25

25

Beyond the Java Language (cont'd)

  • n
slide-26
SLIDE 26

26

Resources

  • Java: java.sun.com
  • JavaPassion: javapassion.com
  • Java EE: java.sun.com/javaee
  • Servlets:

java.sun.com/products/servlet/articles/tutorial/

  • JSP:

java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html

  • JSF: www.ibm.com/developerworks/library/j-jsf1/
  • Ruby, JRuby, Rails:

www.netbeans.org/kb/trails/ruby.html

  • NetBeans: netbeans.org