Last modified 13 years ago Last modified on 05/12/09 00:40:19

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=S2S_WEB_BOOK_MANAGEMENT_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block



Book management means the ability to list, add, removes and search books by various fields.

Task requirements

  • The logged in user should be able to:
    • view lists of all the available books in the database.
    • search the books by some criteria based on their fields(author, title, version, date uploaded...)
    • add new books to the database.
    • remove his/her own books.
  • All of these must happen through web interface.

Task result

  • pages providing book management.

Implementation idea

  • Use BookService class and its methods.
  • Create two jsps - to list and to add books(with form).


How to demo

Show the new created pages.


Create a "books.jsp" file, which lists all the persisted books on the server:

  • Use the BookService class to retrieve a list with the books, and the Book class to iterate through the list, displaying each book in appropriate format(thumbnail,name,author,description, download button). These two require importing the classes in the jsp (use <%@page import=".."%>).
  • Access for non-logged users must be limited - they will not see the "edit" button.
  • If a particular book is uploaded by the current user, he/she will see Edit button. The funcionality of Edit will be implemented in another task.

Create "search.jsp" file:

  • Make a simple search form (like, for example), which posts the entered data to another page. The second page outputs the result, using the BookService class.
  • !search_results.jsp must process the GET from search.jsp and display the results.

Rename the uploaded_books.jsp to my_sophie.jsp, display there a list of the books, whose author is the current user (using the idea of the search), and link to a new page: upload_book.jsp.

  • upload_book must have a form for uploading a book, and a servlet processing the POST data. Again, use the BookService class. Fields in the upload form:
    • Author (defaulted to the name of the user uploading the book)
    • Book title (defaulted to the book filename)
    • File name
    • Description
  • Since this is a prototype, for now just the fields will be added to the database, and the book itself will not be persisted on the server.


  • Created books.jsp, which lists all the entries in the database, with a fake(for now) download button, and if the logged user is the author of a particular book, he/she can see "edit" link, which is also fake for now.
  • uploaded_books.jsp renamed to my_sophie.jsp, linking to upload_book.jsp. Also, there is a sample list of the titles of the books, uploaded by the user;
  • upload_book.jsp posts information to the UploadBookServlet servlet, which adds a book entry in the database and redirects to the homepage with appropriate message. Contains an upload form, having the following fields:
    • author - immutable, the username of the loggeed user;
    • title - the book title to be visible by the others
    • filename - the filename of the book object; unused for now
    • description - short description of the book (the current implementation accepts up to 255 characters)
  • ServerConstants updated with a BOOK_UPLOADED constant
  • ServerModule updated with the UploadBookServlet entry
  • Created search.jsp, which contains a simple search form with a string and a drop-down list. Posts these parameters to the search_results.jsp with the GET method, which proceeds with the search and displays the results.

Changeset: 1011, 1013, 1014, 1016
Refactoring: 1080, 1081


User documentation

ITERATION_07/Release/UserDocumentation/11_WorkingWithSophieServer/04_BrowsingBooksOnSophieServer ITERATION_07/Release/UserDocumentation/11_WorkingWithSophieServer/05_SearchingBooksOnSophieServer

Release documentation

This demonstrates browsing and searching books on S2S

Manual tests

Testlink test ids: 776

Main tests

Testlink test ids: 776

Related tests

Testlink test ids: 323, 773, 779

Reported bugs

(None yet.)


(Write comments for this or later revisions here.)