@Test public void testNoName() throws JspException { for (Wro4jTag tag : asList(allTag(), cssTag(), jsTag())) { try { tag.doStartTag(); fail("The name is mandatory"); } catch (JspException e) { assertTrue(e.getMessage().contains("name")); assertTrue(e.getMessage().contains("mandatory")); } } }
public int doStartTag() throws JspException { if (name == null) throw jspTagException("The name parameter is mandatory"); try { final HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); createRenderer(tags).render(pageContext.getOut(), name, request.getContextPath()); } catch (IOException e) { throw jspTagException(e); } catch (Wro4jTagException e) { throw jspTagException(e); } catch (InvalidGroupNameException e) { throw jspTagException("Group is not in the config file: " + name); } return SKIP_BODY; }
Wro4jTag extends TagSupport { public int doStartTag() throws JspException { if (name == null) throw jspTagException("The name parameter is mandatory"); try { final HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); createRenderer(tags).render(pageContext.getOut(), name, request.getContextPath()); } catch (IOException e) { throw jspTagException(e); } catch (Wro4jTagException e) { throw jspTagException(e); } catch (InvalidGroupNameException e) { throw jspTagException("Group is not in the config file: " + name); } return SKIP_BODY; } }
Wro4jTag extends TagSupport { public int doStartTag() throws JspException { if (name == null) throw jspTagException("The name parameter is mandatory"); try { final HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); createRenderer(tags).render(pageContext.getOut(), name, request.getContextPath()); } catch (IOException e) { throw jspTagException(e); } catch (Wro4jTagException e) { throw jspTagException(e); } catch (InvalidGroupNameException e) { throw jspTagException("Group is not in the config file: " + name); } return SKIP_BODY; } Wro4jTag(ResourceHtmlTag tag);   Wro4jTag(EnumSet<ResourceHtmlTag> tags); }
Wro4jTag extends TagSupport { public int doStartTag() throws JspException { if (name == null) throw jspTagException("The name parameter is mandatory"); try { final HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); createRenderer(tags).render(pageContext.getOut(), name, request.getContextPath()); } catch (IOException e) { throw jspTagException(e); } catch (Wro4jTagException e) { throw jspTagException(e); } catch (InvalidGroupNameException e) { throw jspTagException("Group is not in the config file: " + name); } return SKIP_BODY; } Wro4jTag(ResourceHtmlTag tag);   Wro4jTag(EnumSet<ResourceHtmlTag> tags); String getName(); void setName(String name); int doStartTag(); int doEndTag(); }
Wro4jTag extends TagSupport { public int doStartTag() throws JspException { if (name == null) throw jspTagException("The name parameter is mandatory"); try { final HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); createRenderer(tags).render(pageContext.getOut(), name, request.getContextPath()); } catch (IOException e) { throw jspTagException(e); } catch (Wro4jTagException e) { throw jspTagException(e); } catch (InvalidGroupNameException e) { throw jspTagException("Group is not in the config file: " + name); } return SKIP_BODY; } Wro4jTag(ResourceHtmlTag tag);   Wro4jTag(EnumSet<ResourceHtmlTag> tags); String getName(); void setName(String name); int doStartTag(); int doEndTag();  }