beans in jsp - unitn.itlatemar.science.unitn.it/.../2010webarchitectures/advancedjsp.pdf · beans...
TRANSCRIPT
Beans in JSP
http://courses.coreservlets.com/Course-Materials/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 existingbeans
Example
JSP & Beans summary
JSP Expression Language
http://courses.coreservlets.com/Course-Materials/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/Course-Materials/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 examplein
http://courses.coreservlets.com/Course-Materials/pdf/csajsp2/14-MVC.pdf
(slide 30-42)