0% found this document useful (0 votes)
19 views

Advanced J SP

The document discusses using JavaBeans in JSP pages, including bean properties, getters and setters, basic bean tasks, and setting the bean scope. It also covers the JSP Expression Language for simplifying code and accessing beans, and the model-view-controller pattern for structuring web applications using servlets and JSP, with an example bank balance lookup application.

Uploaded by

Hazzel DN
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Advanced J SP

The document discusses using JavaBeans in JSP pages, including bean properties, getters and setters, basic bean tasks, and setting the bean scope. It also covers the JSP Expression Language for simplifying code and accessing beans, and the model-view-controller pattern for structuring web applications using servlets and JSP, with an example bank balance lookup application.

Uploaded by

Hazzel DN
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Beans in JSP

http://courses.coreservlets.com/CourseMaterials/pdf/csajsp2/13-JavaBeans.pdf

Java Beans

Bean Properties

Examples

Why Getters and setters?

Reason 1

Reason 2

Reason 3

Basic bean tasks

Where's the advantage?

Where do I put beans?

Explicit type convertion

Implicit type conversion

Simple automatic conversion

Select all

Setting the scope

Page, application

Session, request

Accessing and setting existing beans

Example

JSP & Beans summary

JSP Expression Language

http://courses.coreservlets.com/CourseMaterials/pdf/csajsp2/15-Expression-Language.pdf

JSP Expression Language

Code semplification

Invoking EL

Scope?

Dot and Array notation

Accessing collections

Implicit objects

EL Operators

Activating EL

(Selectively) Deactivate EL

Communication Servlet-JSP

MVC with Servlets and JSP

http://courses.coreservlets.com/CourseMaterials/pdf/csajsp2/14-MVC.pdf

Servlets or JSPs?

Servlets or JSPs?

MVC

MVC

MVC misconception

MVC in 6 steps

MVC in 6 steps

Example

Example

Beware of forward!

Forward or redirect?

Example
See the Bank Balance lookup example in http://courses.coreservlets.com/CourseMaterials/pdf/csajsp2/14-MVC.pdf (slide 30-42)

You might also like