@Override public int doEndTag() throws JspException { BodyContent bodyContent = getBodyContent(); String content = bodyContent.getString(); try { if(enabled) { //call YUICompressor YuiCssCompressor compressor = new YuiCssCompressor(); compressor.setLineBreak(yuiCssLineBreak); String result = compressor.compress(content); bodyContent.clear(); bodyContent.append(result); bodyContent.writeOut(pageContext.getOut()); } else { bodyContent.clear(); bodyContent.append(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(); try { if (enabled) { // call YUICompressor YuiCssCompressor compressor = new YuiCssCompressor(); compressor.setLineBreak(yuiCssLineBreak); String result = compressor.compress(content); bodyContent.clear(); bodyContent.append(result); bodyContent.writeOut(pageContext.getOut()); } else { bodyContent.clear(); bodyContent.append(content); bodyContent.writeOut(pageContext.getOut()); } } catch (IOException e) { logger.error("", e); } 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) { 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(); }
bodyContent.append(htmlCompressor.compress(content)); bodyContent.writeOut(pageContext.getOut()); } catch (IOException e) {
bodyContent.append(htmlCompressor.compress(content)); bodyContent.writeOut(pageContext.getOut()); } catch (IOException e) {