Homework 5 (Extra Credit)
CS320, Fall 2008


Due: Wednesday, November 26

Please upload your files to CSNS. The files should include all the source code, documentation, and an HTML file hw5.html, which contains a link to your application on the CS3 server. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.

[Readings]

[Paged Display] (40pt)

Modify the BetNBA application you developed in Homework 4 so that the game list and the bet list are shown in paged display. For example:

BetNBA - Admin
Game Team 1 Team 2 Date Winner
1 Timberwolves Hornets 9/20/2008 Hornets
2 Magic Celtics 9/22/2008 Celtics
3 Heat Warriors 9/25/2008 Heat
4 Lakers Pacers 10/6/2008 Enter Result
5 Trail Blazers Knicks 10/7/2008 Enter Result
Pages: [Previous] 1, 2, 3 [Next]
Add Game

For this assignment, you must use Displaytag (http://displaytag.sourceforge.net/) to create the paged display. You should have at least eleven games/bets in your database, and display five games/bets per page.

[EL Function] (20pt)

Sometimes we want to concatenate two strings in EL, but neither EL nor JSTL provides a string concatenation function. There is a workaround using <c:set>, but it is still inconvenient. For this assignment, implement an EL function concat() that concatenates two strings. Also create a ConcatTest.jsp to test the function with the following code:

${cs320:concat(param.a, param.b) > 'CS203'}

Note that this exercise is not part of the BetNBA application, so you need to provide an additional link in hw5.html that points to your ConcatTest.jsp page on the CS3 server. And when you upload the source code to CSNS, do not forget to upload the TLD file.