Exercices on JSP/Servlets (1)
Exercice 1
Question 1
Write a JSP which computes the sum of two numbers a and b, passed as GET
arguments.
Question 2
Write a HTML page with a form, sending to the JSP you wrote in the first
question.
Question 3
Write a Servlet to do the actual computation. You will use a JSP only to display the
result.
Question 4
Modify your servlet so that it displays a form (in GET mode) and the result (in
POST mode). Don't care about errors.
Question 5
Add proper error processing and display to your servlet.
Exercice 2
Fetch the classes in the source files. Which pattern
is used by ForumFacade ?
Question 1
Write a servlet and corresponding JSP to display a message whose ID is passed
as argument.
Question 2
Write a servlet and corresponding JSP to display the list of messages titles.