From 5274d656ce0be29e2c3cf3b5d6f56099dd5a2e2a Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 31 Aug 2015 15:13:05 +0200 Subject: [PATCH] Continued with project: - Cleaned up duplicated defined methods in interface - Used ServletRequest and ServletResponse instead of Http varriants (casting was required) - Got rid of 2 parameters for doAdminHandleFooForms() methods - Got rid of HttpServletRequest/-Response interfaces, used Http-less varriant - No need to set basket in admin category.jsp - updated jshop.jar MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by:Roland Häder --- lib/jshop.jar | Bin 77128 -> 77963 bytes .../application/PizzaApplication.java | 16 +++--- .../application/PizzaServiceApplication.java | 34 ++++++------ .../beans/controller/PizzaBean.java | 49 +++--------------- .../beans/controller/PizzaServiceBean.java | 21 ++++---- web/admin/category.jsp | 2 +- web/admin/product.jsp | 1 + web/form_handler/admin/do_category.jsp | 5 +- web/form_handler/admin/do_product.jsp | 5 +- 9 files changed, 53 insertions(+), 80 deletions(-) diff --git a/lib/jshop.jar b/lib/jshop.jar index 4a388d8a96917c4e66a374e9707bf2991deaad50..ddd7f0d37085bc62845b5009fba0e3678626e383 100644 GIT binary patch delta 3250 zcmc&$d2Ccg82`S#ub%Xz%Wk*3J$AS4E-kb`i)|4ov;_((lop|gi$UbDMN=iAG!YUJ z5E$ecV@w-sqLFa59HJ;h4EzD4(FB49#7N|lhH{9~czoa6-L|{k{_RUJg%PM>RGOy<7z%v3$#$Dg@szE@4A+?1&!J!->a|rn%5y%#70-r z)X&@K^c_e}5Fm$OY_c*(ae5O-HWTH;^|L-PP3_Pa)>1sUgj1f%Q}3~dt|Tq(r+ z+mzNQy9Viu98RqZ@?yN(U6cjcT4*pq9xO7!C`d3tA|#n06-JvN4a_DO0~QllA>9Nv z$S{EeG7((D=1mpbv*LuVFj1T=a*BuUC9Ou9WrQfu!)SFe&gEKKozxc%N~&KV zW)X>A1}H%jDcq2Hg$hkGd zyCtIcSSSd1KSkCG&gF6+2GzlV+y=S#El|TIIYN@(Dv+PG`DYrT5XOZl5jXRq!m z-x^WCcqob_Kpie%Hwk!e1Ofb6dESa)LWlsG$5xt1P54B97*WYYm=sBgCR|A;Dfwgs zCA_d$NePttV~Gd(3E6|6aBsxSli?}07WtlJdA|Hp-c5N9kC4Z|a1qL&+@B|8<>JoxQf>Er9dM|_%;d^ds;|8_xm8m2~2q7PScKBAIoFg@VhIw*yd=);v< zBqf(dP~zXD2$e7+f)YcxlAj|gSv?b~hD{17F@!6*NlI>wpu~SNAXLknsAlk&$A65> zD@{EmDgZ9IqD_$`%1bn&zaUCfdSeW9L^`yPsfDbrMsMT)a8e&H*n}~nys)lFg|w~G z00_-=HZxl2cxFte6Pgb$|3PRUI>4@dg`3snpx@2+rgd;75`D*E$wZ8`CN7Ng^Ow>qwaChpT?Q@&58!<5T3VN=<} zwL3QP&E1LOpesdey8SN7e@t#V>NztLcegzBp`++x#@Tdo|pA{a>)!+^u+R?8QaD|e4oGI9$rWfhl z7@SCqq_rU5Po$X^^fIouP(SfUEXel?>9GZ;GnQGgnsKWYr!oFu#TrIiI`ZvBTA7Zu zfwoz?oQ}C1L~Fyj+*xnKI>v4r)^mSs1}x1vUs9V;1y z9p|v~bvw>yEOp>K#vKl92)p4(e>t!=eb^eNl@NS7+x8SleO654^(+-dEXIok^n`ek?g|WG{)u>2N`tOFEd8TqtiIanr;4k`G;&1#khMM3O9z>9b7lyfH{eOWjWTKErlah?dH`r?k+>ovV@ z+LjvGgH?}lQ|jV}%t^Iw%waiia^JYevVG&DDB*dikxo(u<}MJYT&_Y9*Ow|;6&NQa z=VClF?p$J)>6u9oJ4Wdws|k(L8Ded`V%je5HD}WH=EAqB;M3XmC^_g8Bb#%upEy`! VT9D957wo8$EP3eAppEZa{{goer+)wd delta 2537 zcmZ`)Yiv|S6h3F4-R*5lA1v*%?RLA}?smKFZXdMtVINv3w57Hd1dFy+6Akf!k?0Q$ zEuc2>fl@{p{82;##z!cHEmRXA5J}{ZfYF#h{DT@rBZUH?u?fa=?%h7NZf`R4%{^zn z@0>aJ&dfX43>U5%l=c?A!3q!uu(oGV$=7xE3|2@TjW1_&e>WuHY{ftz-oqX za2dlC)-WvBEoXRHSFgQ!!~wk}N?nZW8rWB?U&Zj6zM0`${c463Llr}tp^RYwJ)+%W z+_S|Tt#Hmz!R{$T9YMI-`1KOTdyYaAqsLvNPh8vMZ1VNyhPo{P-4?Mqudbxk3RbAK zLLJmwzyb~2J;>cd+%zehURghzB#+L4gDsCjx*Dk|2dO z)G^7BeKCzqgf`Visw$GOilqI&ITUK1O#uT?nq+kms}6LcvnahkhsKGZr@oW?YbcMk z;HEc)<^koD3m!tGg?S^)AR+sV{!!46&_D+)!s!7#F^6oNA^RXd2H8O5{wVgQm~1~3 zMA)@7TgS2d1t-98Y$movx*SQaA_^ZZPPVrEhf6%n#H9!i^2gToa0(*+`HeHsCi(7coA&=B-4=+Z&yF#?+qAb&O}8 z{E|<~@N9i_eKdNS0cJ^^rK(wFIXy4 z1Ic3R#4=Gn-iBWBae-YV-gb!N;}_{vJW!Ak9=utF$xOb#GN(RBWNwYZWyleiC!8X4 zqB2To=ZwhpIRa|*>d|{&jL?1?5h1soPF!2K@9tT3A@!4?1obR^29WmfpUeMTP3-0DhjA1%%;!=z~zZ5^=TFE3AR?>AMn_b9vf_&G7A;vRoC;Z2S ze2mMg99+p*pN9^)KS#Z4N^#AD?g%Hlhjgr zg}yE~f0X768)hi7-j8R$i= diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java index ffae7095..051ddcd9 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java @@ -21,8 +21,8 @@ import java.sql.SQLException; import java.util.Iterator; import javax.servlet.ServletContext; import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; import javax.servlet.http.HttpSession; import org.mxchange.jcore.application.Application; import org.mxchange.jcore.exceptions.BadTokenException; @@ -71,7 +71,7 @@ public interface PizzaApplication extends Application { * @param session Session instance * @return Whether the product is choosen */ - public String getCheckedHtmlFromProduct (final Product product, final HttpServletRequest request, final HttpSession session); + public String getCheckedHtmlFromProduct (final Product product, final ServletRequest request, final HttpSession session); /** * Some "getter" for HTML code 'disabled="disabled"' for e.g. submit buttons @@ -81,7 +81,7 @@ public interface PizzaApplication extends Application { * @return Whether the product is choosen * @throws javax.servlet.ServletException If something unexpected happened */ - public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException; + public String getDisabledHtmlFromSession (final ServletRequest request, final HttpSession session) throws ServletException; /** * Somewhat setter in session @@ -141,7 +141,7 @@ public interface PizzaApplication extends Application { * @throws javax.servlet.ServletException If something unexpected happened * @throws org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException If the given title is already used */ - public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException; + public void doAdminAddCategory (final ServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException; /** * Adds given product data from request to database @@ -150,7 +150,7 @@ public interface PizzaApplication extends Application { * @throws javax.servlet.ServletException If something unexpected happened * @throws org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException If the given product title is already used */ - public void doAdminAddProduct (final HttpServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; + public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; /** * Generates link HTML code for given category's parent id, if set. This @@ -168,7 +168,7 @@ public interface PizzaApplication extends Application { * @param response Response instance * @throws ServletException If something unexpected happened */ - public void doAdminHandleProductForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException; + public void doAdminHandleProductForms (final ServletRequest request, final ServletResponse response) throws ServletException; /** * Handles admin category form requests @@ -177,7 +177,7 @@ public interface PizzaApplication extends Application { * @param response Response instance * @throws ServletException If something unexpected happened */ - public void doAdminHandleCategoryForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException; + public void doAdminHandleCategoryForms (final ServletRequest request, final ServletResponse response) throws ServletException; /** * Some "getter" for a Product instance from given item diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java index 3e57bf39..a5e35eb3 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java @@ -24,6 +24,8 @@ import java.text.MessageFormat; import java.util.Iterator; import javax.servlet.ServletContext; import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -102,7 +104,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P * @deprecated Old lost */ @Deprecated - private int calculateTotalAmount (final HttpServletRequest request, final HttpSession session) throws ServletException { + private int calculateTotalAmount (final ServletRequest request, final HttpSession session) throws ServletException { // Trace message this.getLogger().trace(MessageFormat.format("request={0},session={1} - CALLED!", request, session)); //NOI18N @@ -203,7 +205,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Override - public String getCheckedHtmlFromProduct (final Product product, final HttpServletRequest request, final HttpSession session) { + public String getCheckedHtmlFromProduct (final Product product, final ServletRequest request, final HttpSession session) { // Trace message this.getLogger().trace(MessageFormat.format("product={0},request={1},session={2} - CALLED!", product, request, session)); //NOI18N @@ -236,7 +238,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Override - public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException { + public String getDisabledHtmlFromSession (final ServletRequest request, final HttpSession session) throws ServletException { // Trace message this.getLogger().trace(MessageFormat.format("request={0},session={1} - CALLED!", request, session)); //NOI18N @@ -347,7 +349,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Deprecated - private boolean isProductChoosen (final Product product, final HttpServletRequest request, final HttpSession session) { + private boolean isProductChoosen (final Product product, final ServletRequest request, final HttpSession session) { throw new UnsupportedOperationException("This method is deprecated and shall not be called"); //NOI18N } @@ -468,7 +470,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Override - public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException { + public void doAdminAddCategory (final ServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException { // Trace message this.getLogger().trace(MessageFormat.format("request={0} - CALLED!", request)); //NOI18N @@ -528,7 +530,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Override - public void doAdminAddProduct (final HttpServletRequest request) throws ServletException, ProductTitleAlreadyUsedException { + public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException { // Trace message this.getLogger().trace(MessageFormat.format("request={0} - CALLED!", request)); //NOI18N @@ -693,7 +695,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P * @throws java.lang.IllegalAccessException If the method cannot be accessed * @throws java.lang.reflect.InvocationTargetException Any other problems? */ - private boolean isProductTitleUsed (final HttpServletRequest request) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { + private boolean isProductTitleUsed (final ServletRequest request) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { // Trace message this.getLogger().trace(MessageFormat.format("request={0} - CALLED!", request)); //NOI18N @@ -723,7 +725,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Override - public void doAdminHandleProductForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException { + public void doAdminHandleProductForms (final ServletRequest request, final ServletResponse response) throws ServletException { // Trace message this.getLogger().trace(MessageFormat.format("request={0},response={1} - CALLED!", request, response)); //NOI18N @@ -739,7 +741,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P // Try this operations try { // Is it post? - if ("POST".equals(request.getMethod())) { //NOI18N + if ("POST".equals(((HttpServletRequest) request).getMethod())) { //NOI18N // Is "add/edit/delete" set? if (request.getParameter("add") != null) { //NOI18N // Is it already added? @@ -748,13 +750,13 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P this.getLogger().debug("Already used, redirecting ..."); //NOI18N // Already added, so redirect here, else a ServletException will be thrown - response.sendRedirect(String.format("%s/admin/product.jsp?already=1", request.getContextPath())); //NOI18N + ((HttpServletResponse) response).sendRedirect(String.format("%s/admin/product.jsp?already=1", ((HttpServletRequest) request).getContextPath())); //NOI18N } else { // Add new product this.doAdminAddProduct(request); // Redirect to proper URL - response.sendRedirect(String.format("%s/admin/product.jsp?added=1", request.getContextPath())); //NOI18N + ((HttpServletResponse) response).sendRedirect(String.format("%s/admin/product.jsp?added=1", ((HttpServletRequest) request).getContextPath())); //NOI18N } } else if (request.getParameter("edit") != null) { //NOI18N // TODO @@ -775,7 +777,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Override - public void doAdminHandleCategoryForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException { + public void doAdminHandleCategoryForms (final ServletRequest request, final ServletResponse response) throws ServletException { // Trace message this.getLogger().trace(MessageFormat.format("request={0},response={1} - CALLED!", request, response)); //NOI18N @@ -791,7 +793,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P // Try this operations try { // Is it post? - if ("POST".equals(request.getMethod())) { //NOI18N + if ("POST".equals(((HttpServletRequest) request).getMethod())) { //NOI18N // Is "add/edit/delete" set? if (request.getParameter("add") != null) { //NOI18N // Is the category title already used? @@ -800,13 +802,13 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P this.getLogger().debug("Already used, redirecting ..."); //NOI18N // Already added, so redirect here, else a ServletException will be thrown - response.sendRedirect(String.format("%s/admin/category.jsp?already=1", request.getContextPath())); //NOI18N + ((HttpServletResponse) response).sendRedirect(String.format("%s/admin/category.jsp?already=1", ((HttpServletRequest) request).getContextPath())); //NOI18N } else { // Add new category this.doAdminAddCategory(request); // Redirect to proper URL - response.sendRedirect(String.format("%s/admin/category.jsp?added=1", request.getContextPath())); //NOI18N + ((HttpServletResponse) response).sendRedirect(String.format("%s/admin/category.jsp?added=1", ((HttpServletRequest) request).getContextPath())); //NOI18N } } else if (request.getParameter("edit") != null) { //NOI18N // TODO @@ -839,7 +841,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P * @throws java.lang.IllegalAccessException If the method cannot be accessed * @throws java.lang.reflect.InvocationTargetException Any other problems? */ - private boolean isCategoryTitleUsed (final HttpServletRequest request) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { + private boolean isCategoryTitleUsed (final ServletRequest request) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { // Trace message this.getLogger().trace(MessageFormat.format("request={0} - CALLED!", request)); //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java index c896ff3e..1a7eda3f 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java @@ -18,14 +18,10 @@ package org.mxchange.pizzaapplication.beans.controller; import java.util.Iterator; import javax.faces.FacesException; -import javax.servlet.ServletContext; import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletRequest; import javax.servlet.http.HttpSession; -import org.apache.logging.log4j.Logger; import org.mxchange.jshop.beans.FrameworkBean; -import org.mxchange.jshop.beans.basket.BasketBean; import org.mxchange.jshop.category.Category; import org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException; import org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException; @@ -52,7 +48,7 @@ public interface PizzaBean extends FrameworkBean { * @param session Session instance * @return Whether the product is choosen */ - public String getCheckedHtmlFromProduct (final Product product, final HttpServletRequest request, final HttpSession session); + public String getCheckedHtmlFromProduct (final Product product, final ServletRequest request, final HttpSession session); /** * Some "getter" for HTML code 'disabled="disabled"' for e.g. submit buttons @@ -62,7 +58,7 @@ public interface PizzaBean extends FrameworkBean { * @return Whether the product is choosen * @throws javax.servlet.ServletException If something unexpected happened */ - public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException; + public String getDisabledHtmlFromSession (final ServletRequest request, final HttpSession session) throws ServletException; /** * Somewhat setter in session @@ -122,7 +118,7 @@ public interface PizzaBean extends FrameworkBean { * @throws javax.servlet.ServletException If something unexpected happened * @throws org.mxchange.jshop.exceptions.CategoryTitleAlreadyUsedException If the given title is already used */ - public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException; + public void doAdminAddCategory (final ServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException; /** * Adds given product data from request to database @@ -131,7 +127,7 @@ public interface PizzaBean extends FrameworkBean { * @throws javax.servlet.ServletException If something unexpected happened * @throws org.mxchange.jshop.exceptions.ProductTitleAlreadyUsedException If the given product title is already used */ - public void doAdminAddProduct (final HttpServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; + public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException; /** * Generates link HTML code for given category's parent id, if set. This @@ -145,47 +141,16 @@ public interface PizzaBean extends FrameworkBean { /** * Handles admin product form requests * - * @param request Request instance - * @param response Response instance * @throws ServletException If something unexpected happened */ - public void doAdminHandleProductForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException; + public void doAdminHandleProductForms () throws ServletException; /** * Handles admin category form requests * - * @param request Request instance - * @param response Response instance * @throws ServletException If something unexpected happened */ - public void doAdminHandleCategoryForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException; - - /** - * Getter for logger - * - * @return Logger - */ - public Logger getLogger (); - - /** - * @return the basket - */ - public BasketBean getBasket (); - - /** - * @param basket the basket to set - */ - public void setBasket (final BasketBean basket); - - /** - * @return the application - */ - public ServletContext getApplication (); - - /** - * @param application the application to set - */ - public void setApplication (final ServletContext application); + public void doAdminHandleCategoryForms () throws ServletException; /** * Some "getter" for a product from given item diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java index e29720fb..86b10097 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java @@ -25,8 +25,7 @@ import javax.enterprise.context.SessionScoped; import javax.faces.FacesException; import javax.inject.Named; import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletRequest; import javax.servlet.http.HttpSession; import org.mxchange.jcore.exceptions.BadTokenException; import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException; @@ -77,7 +76,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { @PostConstruct public void init () throws FacesException { // Trace message - this.getLogger().trace(MessageFormat.format("application={0},basket={1} - CALLED!", this.getApplication(), this.getBasket())); //NOI18N + this.getLogger().trace(MessageFormat.format("application={0} - CALLED!", this.getApplication())); //NOI18N // Must not be null if (this.getApplication() == null) { @@ -103,7 +102,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { * @return Whether the product is choosen */ @Override - public String getCheckedHtmlFromProduct (final Product product, final HttpServletRequest request, final HttpSession session) { + public String getCheckedHtmlFromProduct (final Product product, final ServletRequest request, final HttpSession session) { return this.app.getCheckedHtmlFromProduct(product, request, session); } @@ -115,7 +114,7 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { * @return Whether the product is choosen */ @Override - public String getDisabledHtmlFromSession (final HttpServletRequest request, final HttpSession session) throws ServletException { + public String getDisabledHtmlFromSession (final ServletRequest request, final HttpSession session) throws ServletException { return this.app.getDisabledHtmlFromSession(request, session); } @@ -174,12 +173,12 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { } @Override - public void doAdminAddCategory (final HttpServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException { + public void doAdminAddCategory (final ServletRequest request) throws ServletException, CategoryTitleAlreadyUsedException { this.app.doAdminAddCategory(request); } @Override - public void doAdminAddProduct (final HttpServletRequest request) throws ServletException, ProductTitleAlreadyUsedException { + public void doAdminAddProduct (final ServletRequest request) throws ServletException, ProductTitleAlreadyUsedException { this.app.doAdminAddProduct(request); } @@ -194,13 +193,13 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { } @Override - public void doAdminHandleProductForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException { - this.app.doAdminHandleProductForms(request, response); + public void doAdminHandleProductForms () throws ServletException { + this.app.doAdminHandleProductForms(this.getRequest(), this.getResponse()); } @Override - public void doAdminHandleCategoryForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException { - this.app.doAdminHandleCategoryForms(request, response); + public void doAdminHandleCategoryForms () throws ServletException { + this.app.doAdminHandleCategoryForms(this.getRequest(), this.getResponse()); } @Override diff --git a/web/admin/category.jsp b/web/admin/category.jsp index ac9678f7..296caab5 100644 --- a/web/admin/category.jsp +++ b/web/admin/category.jsp @@ -13,7 +13,7 @@ - + <% // TODO: Can be removed later diff --git a/web/admin/product.jsp b/web/admin/product.jsp index 53ba353b..d96787b5 100644 --- a/web/admin/product.jsp +++ b/web/admin/product.jsp @@ -12,6 +12,7 @@ + <% // TODO: Can be removed later diff --git a/web/form_handler/admin/do_category.jsp b/web/form_handler/admin/do_category.jsp index 27b3cd7d..7587ba18 100644 --- a/web/form_handler/admin/do_category.jsp +++ b/web/form_handler/admin/do_category.jsp @@ -9,12 +9,15 @@ <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> + + + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <% // Handle forms - controller.doAdminHandleCategoryForms(request, response); + controller.doAdminHandleCategoryForms(); %> diff --git a/web/form_handler/admin/do_product.jsp b/web/form_handler/admin/do_product.jsp index 87cd6dc9..c076d47f 100644 --- a/web/form_handler/admin/do_product.jsp +++ b/web/form_handler/admin/do_product.jsp @@ -9,12 +9,15 @@ <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%> + + + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <% // Handle forms - controller.doAdminHandleProductForms(request, response); + controller.doAdminHandleProductForms(); %> -- 2.39.5