/** * The user customised the output of the error messages - flush the * buffered content into the main {@link javax.servlet.jsp.JspWriter}. */ protected void flushBufferedBodyContent(BodyContent bodyContent) throws JspException { try { bodyContent.writeOut(bodyContent.getEnclosingWriter()); } catch (IOException ex) { throw new JspException("Unable to write buffered body content.", ex); } }
/** * The user customised the output of the error messages - flush the * buffered content into the main {@link javax.servlet.jsp.JspWriter}. */ protected void flushBufferedBodyContent(BodyContent bodyContent) throws JspException { try { bodyContent.writeOut(bodyContent.getEnclosingWriter()); } catch (IOException ex) { throw new JspException("Unable to write buffered body content.", ex); } }
/** * The user customised the output of the error messages - flush the * buffered content into the main {@link javax.servlet.jsp.JspWriter}. */ protected void flushBufferedBodyContent(BodyContent bodyContent) throws JspException { try { bodyContent.writeOut(bodyContent.getEnclosingWriter()); } catch (IOException ex) { throw new JspException("Unable to write buffered body content.", ex); } }
protected void printBody() throws IOException { bodyContent.writeOut(getPreviousOut()); }
public int doAfterBody() throws JspException { boolean again = component.end(pageContext.getOut(), getBody()); if (again) { return EVAL_BODY_AGAIN; } else { if (bodyContent != null) { try { bodyContent.writeOut(bodyContent.getEnclosingWriter()); } catch (Exception e) { throw new JspException(e.getMessage()); } } return SKIP_BODY; } }
/** * Writes content of tag, returns status to iterate * @throws JspException */ public int doAfterBody() throws JspException { try { bodyContent.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("GetCollectionTag: " + e.getMessage()); } finally { bodyContent.clearBody(); } return SKIP_BODY; }
/** * Writes content of tag, returns status to iterate * @return * @throws JspException */ public int doAfterBody() throws JspException { try { bodyContent.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("GetCollectionTag: " + e.getMessage()); } finally { bodyContent.clearBody(); } return SKIP_BODY; }
public int doAfterBody() throws JspException { boolean hasSection = pageContext.getAttribute("kantega_template_" + id, PageContext.REQUEST_SCOPE) != null; boolean negate = this.negate != null && this.negate.equals("true"); try { if((hasSection && ! negate) || (!hasSection && negate)) { bodyContent.writeOut(getPreviousOut()); } } catch (IOException e) { log.error("Error writing content", e); throw new JspTagException("HasSectionTag", e); } finally { bodyContent.clearBody(); } return SKIP_BODY; }
public int doAfterBody() throws JspException { try { bodyContent.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("GetRandomTag: " + e.getMessage()); } finally { bodyContent.clearBody(); } return doIter(); }
public int doAfterBody() throws JspException { try { bodyContent.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("GetNavigationPathTag: " + e.getMessage()); } finally { bodyContent.clearBody(); } return doIter(); } }
public int doAfterBody() throws JspException { BodyContent body = getBodyContent(); try { body.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("SearchTOCItemTag: " + e.getMessage()); } // clear up so the next time the body content is empty body.clearBody(); if(treeEnum.hasMoreElements()) { SearchTOCItem item = (SearchTOCItem) treeEnum.nextElement(); setNodeAttributes(item); return EVAL_BODY_TAG; } else { return SKIP_BODY; } }
public int doAfterBody() throws JspException { BodyContent body = getBodyContent(); try { body.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("TOCItemTag: " + e.getMessage()); } // clear up so the next time the body content is empty body.clearBody(); if (treeEnum.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) treeEnum.nextElement(); setNodeAttributes(node); return EVAL_BODY_TAG; } else { return SKIP_BODY; } }
public int doAfterBody() throws JspException { BodyContent body = getBodyContent(); try { body.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("IndexItemTag: " + e.getMessage()); } // clear up so the next time the body content is empty body.clearBody(); if (treeEnum.hasMoreElements()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) treeEnum.nextElement(); setNodeAttributes(node); return EVAL_BODY_TAG; } else { return SKIP_BODY; } }
public int doAfterBody() throws JspException { try { SecuritySession session = SecuritySession.getInstance((HttpServletRequest) pageContext.getRequest()); if (!session.isLoggedIn()) { bodyContent.writeOut(getPreviousOut()); } } catch (Exception e) { log.error("", e); throw new JspTagException(e); } finally { bodyContent.clearBody(); } return SKIP_BODY; }
/** * Writes content of tag, returns status to iterate * @return * @throws JspException */ public int doAfterBody() throws JspException { try { bodyContent.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("GetCollectionTag: " + e.getMessage()); } finally { bodyContent.clearBody(); } offset++; return doIter(); }
@Override public int doEndTag() throws JspException { BodyContent bc = getBodyContent(); if (bc != null) { try { NormalizeWhitespaceWriter nww = new NormalizeWhitespaceWriter(getBodyContent().getEnclosingWriter()); bc.writeOut(nww); // make sure orphaned whitespace is flushed nww.done(); } catch (IOException e) { throw new JspException(e); } } return EVAL_PAGE; }
public int doAfterBody() throws JspException { BodyContent body = getBodyContent(); try { body.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("NavigatorsTag: " + e.getMessage()); } // clear up so the next time the body content is empty body.clearBody(); if (i < views.length) { setNavigatorAttributes(views[i++]); return EVAL_BODY_TAG; } else { return SKIP_BODY; } }
/** * Writes content of tag, returns status to iterate * @return * @throws JspException */ public int doAfterBody() throws JspException { try { bodyContent.writeOut(getPreviousOut()); } catch (IOException e) { throw new JspTagException("GetCollectionTag: " + e.getMessage()); } finally { bodyContent.clearBody(); } status.incrementIndex(); return doIter(); }
@Override public int doEndTag() throws JspException { BodyContent bodyContent = getBodyContent(); String content = bodyContent.getString(); XmlCompressor compressor = new XmlCompressor(); compressor.setEnabled(enabled); compressor.setRemoveComments(removeComments); compressor.setRemoveIntertagSpaces(removeIntertagSpaces); try { bodyContent.clear(); bodyContent.append(compressor.compress(content)); bodyContent.writeOut(pageContext.getOut()); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return super.doEndTag(); }
@Override public int doEndTag() throws JspException { BodyContent bodyContent = getBodyContent(); String content = bodyContent.getString(); XmlCompressor compressor = new XmlCompressor(); compressor.setEnabled(enabled); compressor.setRemoveComments(removeComments); compressor.setRemoveIntertagSpaces(removeIntertagSpaces); try { bodyContent.clear(); bodyContent.append(compressor.compress(content)); bodyContent.writeOut(pageContext.getOut()); } catch (IOException e) { logger.error("", e); } return super.doEndTag(); }