Homework 3
CS320,
Spring 2005
Due: Friday, May 6
Please upload your files using the online
turnin server.
The files should include all the source code, documentation, and an
HTML
file hw3.html,
which
contains a link to your JSP page on the CS server. Note that file
uploading will be disabled automatically after 11:59PM
of the due date, so please turn in your work on time.
[Reading]
- Textbook - Chapter 10, 11,
12, 14, and 16.
- J2EE
Tutorial - Chapter 12 up to
"Using Custom Tags", and the sections
about JSTL Core and Functions in Chapter 14.
- JSTL
1.1 Tag References - Again, only
Core and Functions.
[JSP Bulletin Board] (75pt)
Convert your bulletin board servlet from Homework 2
to JSP. You do not
have to implement any new features, however,
your JSP implementation of the bulletin board must meet the following
requirements:
- No
scripting elements. The only exception for this
requirement is the Logout feature, which you may implement as
<%
if( request.getParameter("logout") !=
null )
{
session.invalidate();
response.sendRedirect("Login.jsp");
return;
}
%>
There are ways to get rid of this scriptlet too, but we'll have to wait
until we discuss custom taglibs. Also note that comments and directives
are not considered as scripting elements.
- All features described in Homework 1
and Homework
2 must work in this
implementation.
Failing to meet this requirement will incur up to 30pt credit penalty.
[Return Statement] (5pt)
Note that there is a return statement in the logout scriptlet above. In
your hw3.html, briefly discuss why the return statement is necessary,
and what would happen if the statement is removed.
[NOTES]
- Turn your classes for forum, topic, post, user etc. into beans.
- Try use different JSP pages for different "views", e.g. forum
list view or topic list view or input form etc. Generally speaking, it
is easier to develop and maintain several simple JSPs than a single JSP
with complex flow control.
- Beans and other variables in session scope are shared by all JSP
pages.
- Good interface design will receive up to 20pt extra credit.