} else {
// Add new product
this.doAdminAddProduct(request);
+
+ // Redirect to proper URL
+ response.sendRedirect(String.format("%s/admin/product.jsp?added=1", request.getContextPath())); //NOI18N
}
} else if (request.getParameter("edit") != null) { //NOI18N
// TODO
// TODO
}
- // Redirect to proper URL
- // TODO Commented out for developing:
- //response.sendRedirect(request.getContextPath() + "/finished.jsp");
+ // Request not handled
+ throw new ServletException("request not handled."); //NOI18N
}
} catch (final IOException | SQLException | BadTokenException | CorruptedDatabaseFileException | ProductTitleAlreadyUsedException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | IllegalArgumentException ex) {
// Throw it as cause
} else {
// Add new category
this.doAdminAddCategory(request);
+
+ // Redirect to proper URL
+ response.sendRedirect(String.format("%s/admin/category.jsp?added=1", request.getContextPath())); //NOI18N
}
} else if (request.getParameter("edit") != null) { //NOI18N
// TODO
// TODO
}
- // Redirect to proper URL
- // TODO Commented out for developing:
- //response.sendRedirect(request.getContextPath() + "/finished.jsp");
+ // Request not handled
+ throw new ServletException("request not handled."); //NOI18N
}
} catch (final IOException | SQLException | BadTokenException | CorruptedDatabaseFileException | CategoryTitleAlreadyUsedException | NoSuchMethodException | IllegalAccessException | InvocationTargetException | IllegalArgumentException ex) {
// Throw it as cause
@Override
public Product getProduct (final AddableBasketItem item) throws ServletException {
// Trace message
- this.getLogger().trace("item=" + item + " - CALLED!"); //NOI18N
+ this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
// item should not be null
if (null == item) {
}
// Trace message
- this.getLogger().trace("product=" + product + " - EXIT!"); //NOI18N
+ this.getLogger().trace(MessageFormat.format("product={0} - EXIT!", product)); //NOI18N //NOI18N
// Return it
return product;