Package javango.http

Examples of javango.http.HttpException


    try {
      Template template = cfg.getTemplate(this.template);
      template.process(getContext(), writer);
    } catch (TemplateException e) {
      log.error(e,e);
      throw new HttpException(e);
    } catch (IOException e) {
      log.error(e,e);
      throw new HttpException(e);
    }
  }
View Full Code Here


            // TODO if in debug mode show a more detailed message
            // Unable to find Views.class[methodName(HttpResponse, otherparams)]
            // Views contained the following methods
            // ... (is it possible to show methods from a class?)
            log.error("Unable to find method matching name='" + this.methodName + "' and param count = " + m.groupCount() );
            throw new HttpException("Unable to find method matching name='" + this.methodName + "' and param count = " + m.groupCount() );
          }

        }
      }
      Object[] params = new Object[m.groupCount()+1];
View Full Code Here

         
          if( response == null) {
            if (e instanceof HttpException) {
              throw (HttpException)e;
            }
            throw new HttpException(e);
          }
        }
      }
    }
   
View Full Code Here

        } catch (InvocationTargetException e) {
            if (e.getTargetException() instanceof HttpException) {
                throw (HttpException)e.getTargetException();
            } else if (e.getTargetException() instanceof Exception) {
              e.printStackTrace();
                throw new HttpException(e.getTargetException());
            }
            throw new HttpException(e);
        } catch (Exception e) {
            throw new HttpException(e);
        }
    }
View Full Code Here

      context.put("latest_poll_list", latest_poll_list);
     
      return renderToResponse("javango/polls/templates/index.ftl", context);
     
    } catch (ManagerException e) {
      throw new HttpException(e);
    }
  }
View Full Code Here

    public List<Url> getUrlPatterns() {
      return l;
    }
   
    public HttpRequest view(HttpRequest req) throws HttpException {
      throw new HttpException("IGOTCALLED");
    }
View Full Code Here

      updateContext(context, pc, ma);
         
      context.put("page_title", String.format("Select %s to change", findVerboseName(pc, ma)));     
      return renderToResponse(ma.getChangeListTemplate(), context);
    } catch (ManagerException e) {
      throw new HttpException(e);
    }
  }
View Full Code Here

         
      context.put("page_title", String.format("Change %s", findVerboseName(pc, ma)));
      return renderToResponse(ma.getChangeFormTemplate(), context);
    } catch (Exception e) {
      log.error(e,e);
      throw new HttpException(e);
    }
  }
View Full Code Here

     
      context.put("page_title", "Are you sure?");
      return renderToResponse(ma.getConfirmDeleteTemplate(), context);
    } catch (Exception e) {
      log.error(e,e);
      throw new HttpException(e);
    }
  }
View Full Code Here

      Template t = new Template(new File(template));
      t.render(new ContextStack(context), writer);
      writer.flush();
    } catch (IOException e) {
      log.error(e,e);
      throw new HttpException(e);
    }
  }
View Full Code Here

TOP

Related Classes of javango.http.HttpException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.