]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued with project:
authorRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 13:13:05 +0000 (15:13 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 31 Aug 2015 13:13:05 +0000 (15:13 +0200)
- 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

Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jshop.jar
src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java
src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java
src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java
src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java
web/admin/category.jsp
web/admin/product.jsp
web/form_handler/admin/do_category.jsp
web/form_handler/admin/do_product.jsp

index 4a388d8a96917c4e66a374e9707bf2991deaad50..ddd7f0d37085bc62845b5009fba0e3678626e383 100644 (file)
Binary files a/lib/jshop.jar and b/lib/jshop.jar differ
index ffae7095da94fbe51254ca68c637def8564273c4..051ddcd99ae653075b271f7eb0df731581eb1355 100644 (file)
@@ -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
index 3e57bf3956dcc52c22992939fc16f56a4be0bdab..a5e35eb3317f34af7194bbbbc075c558dd2fbc27 100644 (file)
@@ -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
 
index c896ff3e88dca46014242e87aa3e02e266ebc192..1a7eda3f09ef93b6f88aaa535d92b24ce180fcda 100644 (file)
@@ -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
index e29720fb62e7d2581fa3a10d1bf3e55025e73a5b..86b100971158ca156601ee42ea85e313a983f82d 100644 (file)
@@ -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
index ac9678f763f5bfacb834337eee4eb3a04b46e46b..296caab531521af7a41bffa42d690d0e29ffc958 100644 (file)
@@ -13,7 +13,7 @@
 <jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
 
 <jsp:setProperty name="controller" property="application" value="${pageContext.servletContext}" />
-<jsp:setProperty name="controller" property="basket" value="${basket}" />
+<jsp:setProperty name="controller" property="session" value="${pageContext.session}" />
 
 <%
        // TODO: Can be removed later
index 53ba353b60a384584e6a51a48a4bff44c2334769..d96787b56f67f361d9bd12ce128a7e8d9a9089c3 100644 (file)
@@ -12,6 +12,7 @@
 <jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
 
 <jsp:setProperty name="controller" property="application" value="${pageContext.servletContext}" />
+<jsp:setProperty name="controller" property="session" value="${pageContext.session}" />
 
 <%
        // TODO: Can be removed later
index 27b3cd7de0c918ffd198fe56ae7c8a1f4dbbe4ba..7587ba1817fba48d819bef1064a550f38cd034ba 100644 (file)
@@ -9,12 +9,15 @@
 <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
 <jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
 
+<jsp:setProperty name="controller" property="request" value="${pageContext.request}" />
+<jsp:setProperty name="controller" property="response" value="${pageContext.response}" />
+
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <c:set var="basePath" value="${pageContext.request.contextPath}" />
 
 <%
        // Handle forms
-       controller.doAdminHandleCategoryForms(request, response);
+       controller.doAdminHandleCategoryForms();
 %>
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
index 87cd6dc98b6eb657758aa9aa955bf7638bc47520..c076d47f7f43e73543e0f5073ad58adb9535ea0a 100644 (file)
@@ -9,12 +9,15 @@
 <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
 <jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
 
+<jsp:setProperty name="controller" property="request" value="${pageContext.request}" />
+<jsp:setProperty name="controller" property="response" value="${pageContext.response}" />
+
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <c:set var="basePath" value="${pageContext.request.contextPath}" />
 
 <%
        // Handle forms
-       controller.doAdminHandleProductForms(request, response);
+       controller.doAdminHandleProductForms();
 %>
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">