Week 2 Flashcards
JavaBean definition?
Java public class that follows 3 rules
- Is seriazable
- Has a public no-argument constructor
- Has necessary get/set methods
JavaBean definition?
Java public class that follows 3 rules
- Is seriazable
- Has a public no-argument constructor
- Has necessary get/set methods
How to use Javabean?
What does servlet class inherit from?
Http Servlet
HttpServletRequest contains?
ip address
previously set cookies
data submitted with an input form
browser information
HttpServletResponse contains?
generated web-pages
new cookies
error codes
redirects
Forwarding
Forwarding happens entirely on server side
Browsers do not have a clue if forwarding happened
What does a model do?
Encapsulates core data and logic
Independent from views
Model can be implemented with JavaBeans
What does a view do?
Present the outputs to the user
Can be implemented with jsp
What does a controller do?
Receives inputs from the user
Handles inputs
Connects model data to views and dispatches the views
Servlet Context parameters?
Global application parameters
Servlet Context parameters?
Global application parameters
How to use Javabean?
////
What does servlet class inherit from?
Http Servlet
HttpServletRequest contains?
ip address
previously set cookies
data submitted with an input form
browser information