Package se.rupy.http

Examples of se.rupy.http.Output


          Item item = new Item();
          item.path = "file";
          item = save(event, item);

          String path = frame(item);
          Output out = event.output();

          out.println("<script>");
          out.println("  var doc = window.top.document;");
          out.println("  doc.user.picture.value = '" + path + "';");
          out.println("  doc.picture.src = '" + path + "';");
          out.println("</script>");
        }
        catch(Exception e) {
          e.printStackTrace();
          throw e;
        }
View Full Code Here


        if(article != null) {
          StringBuffer buffer = new StringBuffer();
          article.print(buffer, 0);
          JSONObject json = XML.toJSONObject(buffer.toString());
          event.reply().type("application/javascript");
          Output out = event.output();
          String element = User.host.replace('.', '_') + "_" + article.getId();
          out.println("var article = " + json + ";");
          out.println("document.getElementById('" + element + "_head').innerHTML = article.item.head;");
          out.println("document.getElementById('" + element + "_body').innerHTML = article.item.body;");
        }
      }
    }
View Full Code Here

    public void filter(Event event) throws Event, Exception {
      try {
        new In(event);
        Reply reply = event.reply();
        reply.type("text/xml");
        Output out = reply.output();
        out.println("<?xml version=\"1.0\"?>");
        out.println("<methodResponse>");
        out.println("  <params>");
        out.println("    <param>");
        out.println("      <value>");
        out.println("        <string>Pingback registered.</string>");
        out.println("      </value>");
        out.println("    </param>");
        out.println("  </params>");
        out.println("</methodResponse>");
      }
      catch(Exception e) {
        e.printStackTrace();
        throw e;
      }
View Full Code Here

TOP

Related Classes of se.rupy.http.Output

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.