private void htmlByCategory(PrintWriter printWriter, String category) throws InvalidCredentialsException {
		htmlTop(printWriter);

		printWriter.println("<h3>In Category: " + category + "</h3>");
		if (category != null) {
			printWriter.println("<table border=\"1\">");
			printWriter.println("<tr><th>ISBN</th><th>Rating</th><th>Title</th><th>Author</th></tr>");
			for (String isbn : this.service.searchBooksByCategory(this.sessionId, category)) {
				printWriter.println("<tr><td>" + isbn + "</td>");
				Book book;
				try {
					book = this.service.getBook(this.sessionId, isbn);
					printWriter.println("<td>" + book.getRating() + "</td><td>" + book.getTitle() + "</td><td>"
							+ book.getAuthor() + "</td>");
				} catch (BookNotFoundException e) {
					printWriter.println("<td>-</td><td>" + e.getMessage() + "</td><td>-</td>");
				}

				printWriter.println("</tr>");
			}
			printWriter.println("</table>");
		}

		htmlBottom(printWriter);
	}