Package com.googlecode.richrest.server.map

Examples of com.googlecode.richrest.server.map.ModelMap


  }

  protected void serialize(Serializable obj, HttpServletResponse response, String page) throws IOException {
    try {
      Template template = velocityEngine.getTemplate(page);
      Context context = new VelocityContext(new ModelMap(obj));
      template.merge(context, response.getWriter());
    } catch (RuntimeException e) {
      throw e;
    } catch (IOException e) {
      throw e;
View Full Code Here


  }

  protected void serialize(Serializable obj, HttpServletResponse response, String page) throws IOException {
    Template template = configuration.getTemplate(page, getLocale());
    try {
      template.process(new ModelMap(obj), response.getWriter());
    } catch (TemplateException e) {
      throw new RuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of com.googlecode.richrest.server.map.ModelMap

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.