Web Architecture

Web Architectures 2006-07 > Course material > 10 - Practical session
  General Information   Course material   Exam    
1 - Introduction
2 - Applets
3 - Sockets
4-Servlets
5 - JSP
6 - CSS
7 - Cookies and Sessions
8 - Javascript
9 - More on Servlets
10 - Practical session
11 - Introduction to XML
12 - XML - DTD - XSL
13 - Java Binding to XML
14 - Remote objects
15 - Persistency - JDBC
16 - Naming Services
17 - ANT & Intro to EJB
18/19 - Stateless Session beans
20 - Entities & JBoss examples
21 - Riese evaluation
22 - advanced persistency
23 - Ajax
24 - EJB Transactions - Struts
25 Patterns - Struts2
26 - Aspect Oriented Programming
 
10 - Practical session
October 12, 2006 - lecture by Angela Fogarolli

    Exercise on Servlet

  1. 1. step:
    • create a jsp page that takes in input a string (ex. product name);
    • create a servlet that puts the string input in a shopping cart(Session variable).
  2. 2. step:
    • create a jsp page that shows the content of the shopping cart.
  3. 3. step:
    •  create a login filter. The filter should be applied to all pages. The filter should check if the user is already logged or not (checking a Session variable)
    Alternatives
      • a) if the user is not logged write a debug information ("user not logged") and do the login writing  the Session variable..
      • b) If the user is not logged redirect the request to a login page.
Solution
Esercizio1.zip23.43KB
Solution provided by Alessandro Bertacco


 

more rss...

powered by segue
segue_logo