Roland Haeder [Thu, 13 Aug 2015 11:21:21 +0000 (13:21 +0200)]
Continued with project:
- added placeholder class for category datbase constants
- added stub JSPs for handling category and product requests in admin area
- improved category handling a little more
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Thu, 13 Aug 2015 10:51:46 +0000 (12:51 +0200)]
Continued with project:
- added thrown exceptions
- Very rude implementation of getResultFromSet()
- getProducts() and getCategories() now only throw ServletException
- The above change allows to remove the try-catch block
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Thu, 13 Aug 2015 08:41:26 +0000 (10:41 +0200)]
Continued with project:
- Added new frontend class and interface for categories + rewritings
- Used <c:forEach> instead of for-loop where possible, else a while() loop has to be used with iterator.hasNext() and iterator.next()
Roland Haeder [Thu, 13 Aug 2015 07:37:43 +0000 (09:37 +0200)]
Continued with project:
- Added menu item (and JSP) for categories
- Renamed JSP to get rid of plural
- Started with refactoring of application, the whole product (and now category) list would be kept in RAM which is far to much wasting
- Got rid of getUnmarkedProducts(), better use generic getProducts()
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Wed, 12 Aug 2015 12:35:40 +0000 (14:35 +0200)]
Continued with project:
- Method getProducts() throws now more exceptions (from low-level classes)
- These need to be thrown until they reach the application server's exception handler
- Temporary commented out error pages
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Wed, 12 Aug 2015 11:48:30 +0000 (13:48 +0200)]
Continued with project:
- Added database.backend.storagepath for file-based database backends (very simple)
- Used getRealPath() to get server's full web path, but went 2 up to get away from web-reachable path
- Added catching of more thrown exceptions
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Wed, 12 Aug 2015 10:28:35 +0000 (12:28 +0200)]
Continued with project:
- Moved some classes to proper location
- Removed no longer glassfish-specific character encoding, because ..
- Added filter for setting character encoding to UTF-8
- Added "data" directory + ignored all files in it
- Rewrote initialization of properties so the context parameter from web.xml can be used to set needed properties for jcore database backend. Still this is not so satifying, maybe the method needs to be moved to jcore?
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Tue, 11 Aug 2015 12:06:41 +0000 (14:06 +0200)]
Continued with project:
- Moved call of markProductAsOrdered() to do_order.jsp
- Logged more data in some debug/trace messages
- If choose[product] is set in session, it can only be unset now, this saves some calls
- Added some trace messages
- Removed synchronized() check
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Tue, 11 Aug 2015 11:09:47 +0000 (13:09 +0200)]
Continued:
- Moved login/register to own path /customer/
- Added "static" include "login_form.jsp" and "gender_selection_box.jsp"
- Added form handler "do_preview.jsp" and moved code from preview.jsp to it
- style.css should be referenced with full path so all pages can have same HTML code
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Tue, 11 Aug 2015 09:22:13 +0000 (11:22 +0200)]
Now that instance product has no method to mark it as choosen (bad idea as all users will have it choosen then) there needs to be added a new method for this
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Mon, 10 Aug 2015 13:16:45 +0000 (15:16 +0200)]
Continued with project:
- I had a misunderstanding how beans work, so now it is fixed
- Always try to write against interfaces and also check against them (instanceof)
- Gender can also be taken directly from customer bean
- Use customer bean instead of ugly getPrintableValeFromSession() calls
- some other improvements
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Fri, 7 Aug 2015 12:54:53 +0000 (14:54 +0200)]
Continued with project:
- rewrote iteration over Contact fields with an iterator from Map.Entry
- added default values in orderjsp (to output session-stored values)
- introduced getPrintableValueFromSession() which returns a value from session key or an empty string for null
- introduced getValueFromSession() which is a low-level method to get a value from session key (but sychronized)
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Fri, 7 Aug 2015 09:56:20 +0000 (11:56 +0200)]
Continued with project:
- Included displaying of gender and translation (yes, there is a better way doing internalizations than this one)
- Introduced BasePizzaServiceSystem which is a general class for (almost) all other classes
- Moved some classes to proper location
Roland Haeder [Thu, 6 Aug 2015 10:53:11 +0000 (12:53 +0200)]
Introduced protected setter. Setters can change attributes in an object, which is not always wanted, right? :-)
Signed-off-by:Roland Häder <roland@mxchange.org>
Roland Haeder [Thu, 6 Aug 2015 07:18:50 +0000 (09:18 +0200)]
Use MessageFormat.format() or String.format() and not + which causes a lot String objects being created in pool
Signed-off-by:Roland Häder <roland@mxchange.org>