if (bookId != null) {
// and the information about the book
try {
Book bd = bookDB.getBook(bookId);
Currency c = (Currency) session.getAttribute("currency");
if (c == null) {
c = new Currency();
c.setLocale(request.getLocale());
session.setAttribute("currency", c);
}
c.setAmount(bd.getPrice());
//Print out the information obtained
out.println(
"<h2>" + bd.getTitle() + "</h2>" + " "
+ messages.getString("By") + " <em>"
+ bd.getFirstName() + " " + bd.getSurname()
+ "</em> " + "(" + bd.getCalendar_year()
+ ")<br> <br>" + "<h4>"
+ messages.getString("Critics") + "</h4>"
+ "<blockquote>" + bd.getDescription()
+ "</blockquote>" + "<h4>"
+ messages.getString("Price") + c.getFormat() + "</h4>"
+ "<p><strong><a href=\""
+ response.encodeURL(
request.getContextPath()
+ "/bookcatalog?bookId=" + bookId) + "\">"
+ messages.getString("CartAdd")