Package javax.servlet.jsp

Examples of javax.servlet.jsp.JspWriter


     * @exception JspException if a processing error occurs
     */
    public int doEndTag() throws JspException {

        TreeControl treeControl = getTreeControl();
        JspWriter out = pageContext.getOut();
        try {
            out.print
                ("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"");
            if (style != null) {
                out.print(" class=\"");
                out.print(style);
                out.print("\"");
            }
            out.println(">");
            int level = 0;
            TreeControlNode node = treeControl.getRoot();
            render(out, node, level, treeControl.getWidth(), true);
            out.println("</table>");
        } catch (IOException e) {
            throw new JspException(e);
        }

        return (EVAL_PAGE);
View Full Code Here


  }

  public int doAfterBody() throws JspException {

    if (bodyContent != null) {
      JspWriter writer = pageContext.getOut();
      if (writer instanceof BodyContent)
        writer = ((BodyContent) writer).getEnclosingWriter();
      try {
        writer.print(bodyContent.getString());
      } catch (IOException e) {
        throw new JspException(e);
      }
      bodyContent.clearBody();
    }
View Full Code Here

   *  returns int
   */
  public int doStartTag()
    throws JspException
  {
    JspWriter writer = pageContext.getOut();

    try
    {
      ;
    }
View Full Code Here

   *  returns int
   */
  public int doEndTag()
    throws JspException
  {
    JspWriter writer = pageContext.getOut();

    try
    {
      setTitle();
      writer.print(getTitle());
    }
    catch (Exception e)
    {
      System.out.println("Exception in end tag is : " + e.toString());
    }
View Full Code Here

   * @throws JspTagException if an IOException occurs
   */
  private void write(String string) throws JspTagException
  {
    try {
      JspWriter out = this.pageContext.getOut();
      out.write(string);
    } catch (IOException e) {
      throw new JspTagException("Writer Exception: " + e.getMessage());
    }
  }
View Full Code Here

            }
            buf.append(MessageFormat.format(body, new Object[]{format}));
        }

        try {
            JspWriter out = bc.getEnclosingWriter();
            out.print(buf.toString());
        } catch (IOException ioe) {
            throw new JspException("Error:IOException while writing to client" + ioe.getMessage());
        }

        return SKIP_BODY;
View Full Code Here

     */
    @Override
    public void doTag() throws JspException {
        try {
            JspContext context = getJspContext();
            JspWriter out = context.getOut();
            out.print(encodeToHtmlEntities(code));
        } catch (java.io.IOException ex) {
            throw new JspException(ex.getMessage());
        }
    }
View Full Code Here

     */
    @Override
    public void doTag() throws JspException {
        try {
            JspContext context = getJspContext();
            JspWriter out = context.getOut();
            Cipherer cipher = (Cipherer) context.getAttribute(Cipherer.CIPHERER, 2);
            String encoded = cipher.encrypt(code);
            if (logger.isDebugEnabled()) logger.debug("Ciphered [" + code + "] to [" + encoded + "] in view");
            out.print(encoded);
        } catch (java.io.IOException ex) {
            throw new JspException(ex.getMessage());
        }
    }
View Full Code Here

    public void doTag() throws JspException {
        long id = Math.round(Math.random() * 1000000);
        if (property != null) getJspContext().setAttribute(property, id);
        else {
            try {
                JspWriter out = getJspContext().getOut();
                out.print(id);
            } catch (java.io.IOException ex) {
                throw new JspException(ex.getMessage());
            }
        }
    }
View Full Code Here

     * @see net.sf.jportlet.web.taglib.BaseTag#doStartHtml(javax.servlet.http.HttpServletRequest)
     */
    protected int doStartHtml( HttpServletRequest request )
        throws IOException
    {
    JspWriter out = pageContext.getOut(  );
   
    out.write( "<tr><td valign='top'" );
    outputCss();
        out.write( "><table width='100%' border='0' cellspacing='0' cellpadding='0'>\n" );
        return EVAL_BODY_INCLUDE;
    }
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.JspWriter

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.