/** Metoda processRequest jest wywoywana z metod  
  * doGet i doPost serwletu **/
protected void processRequest(HttpServletRequest request,
                              HttpServletResponse response)
                              throws ServletException, java.io.IOException {

  String resultPage;
  try {
    RequestHelper helper = new RequestHelper(request);

    /** metoda getCommand() korzysta z fabryki, by otrzyma obiekty polece: 
        Command command = CommandFactory.create(request.getParameter(op));
    **/
     Command command =  helper.getCommand();
 
    // przekazanie zapytania do obiektu pomocniczego zapyta
    resultPage = command.execute(request, response);
  }
  catch (Exception e) {
    LogManager.logMessage("FrontController", e.getMessage() );
    resultPage = ApplicationResources.getInstance().getErrorPage(e);
  }
  dispatch(request, response, resultPage);
}
