3. Page 2Classification: Restricted
What we covered till now in Servlets…
• Servlet API – GenericServlet and HttpServlet
• Servlet LifeCycle
• Servlet Collaboration using response.sendRedirect()
• Forwarding and Including using RequestDispatcher
• Parameters and Attributes
• Session Tracking / Session Management
• Validation: Frontend & Backend.
5. Page 4Classification: Restricted
Flow of the demo app
CLIENT SERVER
/index.html
Sends back index.html (HTML
Code downloaded)
/Login
Login successful HTML
+ session id
/MoreInfo with parameters +
Session ID
Page with more information
/Logout
Page with Logout Success
Message
7. Page 6Classification: Restricted
Value Object
• Used to compound related characteristics to form a meaningful object (i.e.
object of value)
e.g. To describe currency, “1000” “USD” make sense when compounded
together to form an object
anotherMethod(amount,currency,field1,field2,field3…)
anotherMethod(money)
public class Money{
int amount;
String currency;
}