code: public static String renderTemplate(
          CmsObject cms,
          String template,
          CmsJspContentAccessBean content,
          Map<String, Object> contextObjects) {
  
          STGroup group = new STGroup('%', '%');
          group.registerRenderer(Date.class, new DateRenderer());
          CompiledST cST = group.defineTemplate("main", template);
          cST.addArg(new FormalArgument("content"));
          if (contextObjects != null) {
              for (Entry<String, Object> entry : contextObjects.entrySet()) {
                  cST.addArg(new FormalArgument(entry.getKey()));
              }
          }
          ST st = group.getInstanceOf("main");
          st.add("content", content);
          if (contextObjects != null) {
              for (Entry<String, Object> entry : contextObjects.entrySet()) {
                  st.add(entry.getKey(), entry.getValue());
              }
          }
          return st.render(cms.getRequestContext().getLocale());
      }
docs: Renders the given string template.<p>
  
  @param cms the cms context
  @param template the template
  @param content the content
  @param contextObjects additional context objects made available to the template
  
  @return the rendering result