Homework 3
CS320, Spring 2006
Due: Saturday, May 6
Please upload your files using CSNS.
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 Blog Manager] (75pt)
Convert your blog servlet from Homework
2
to JSP. You do not
have to implement any new features, however,
your JSP implementation of the bookmark manager must meet the following
requirements:
- No
scripting elements, which include JSP Expression, Scriptlet, and JSP
Declaration. 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 40pt 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]
- Try use different JSP pages
for different "views", e.g. login view or blog view or comment view
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.
- If you use session scope beans, the user added posts and/or
comments may be lost after the user log out, and that's all right.
We'll
deal with this in the next assignment.