public XmlAppendable tag(String tag, Map<String,String> attributes,String content) throws IOException { _out.append(_space).append('<').append(tag); attributes(attributes); _out.append('>'); content(content); _out.append("</").append(tag).append(">\n"); return this; }
public XmlAppendable tagCDATA(String tag,String data) throws IOException { _out.append(_space).append('<').append(tag).append('>'); cdata(data); _out.append("</").append(tag).append(">\n"); return this; }
XmlAppendable out = new XmlAppendable(stream,"UTF-8"); out.openTag("web-app",webappAttr); if (_webApp.getDisplayName() != null) out.tag("display-name",_webApp.getDisplayName()); out.openTag("context-param") .tag("param-name", ORIGIN) .tag("param-value", _originAttribute) .closeTag(); out.openTag("context-param",origin(md,"context-param." + p)) .tag("param-name",p) .tag("param-value",_webApp.getInitParameter(p)) .closeTag(); out.openTag("listener",origin(md,e.getClassName() + ".listener")) .tag("listener-class",e.getClassName()) .closeTag(); out.openTag("filter-mapping"); out.tag("filter-name",mapping.getFilterName()); if (mapping.getPathSpecs() != null) for (String s : mapping.getPathSpecs()) out.tag("url-pattern",s); if (mapping.getServletNames() != null) for (String n : mapping.getServletNames()) out.tag("servlet-name",n);
out.openTag("filter",Collections.singletonMap("source",holder.getSource().toString())); else out.openTag("filter"); out.tag("filter-name",n); out.tag("filter-class",origin(md,ot + "filter-class"),holder.getClassName()); out.tag("async-supported",origin(md,ot + "async-supported"),holder.isAsyncSupported()?"true":"false"); out.openTag("init-param",origin(md,ot + "init-param." + p)) .tag("param-name",p) .tag("param-value",holder.getInitParameter(p)) .closeTag(); out.closeTag();
public XmlAppendable openTag(String tag, Map<String,String> attributes) throws IOException { _out.append(_space).append('<').append(tag); attributes(attributes); _out.append(">\n"); _space=_space+SPACES.substring(0,_indent); _tags.push(tag); return this; }
private void attributes(Map<String,String> attributes) throws IOException { for (String k:attributes.keySet()) { String v = attributes.get(k); _out.append(' ').append(k).append("=\""); content(v); _out.append('"'); } }
out.openTag("servlet",Collections.singletonMap("source",holder.getSource().toString())); else out.openTag("servlet"); out.tag("servlet-name",n); out.tag("jsp-file",s.getForcedPath()); else out.tag("servlet-class",origin(md,ot + "servlet-class"),s.getClassName()); out.openTag("init-param",origin(md,ot + "init-param." + p)) .tag("param-name",p) .tag("param-value",holder.getInitParameter(p)) .closeTag(); out.tag("load-on-startup",Integer.toString(s.getInitOrder())); out.tag("enabled",origin(md,ot + "enabled"),"false"); out.tag("async-supported",origin(md,ot + "async-supported"),holder.isAsyncSupported()?"true":"false"); out.openTag("run-as",origin(md,ot + "run-as")) .tag("role-name",s.getRunAsRole()) .closeTag(); out.openTag("security-role-ref",origin(md,ot+"role-name."+e.getKey())) .tag("role-name",e.getKey()) .tag("role-link",e.getValue()) .closeTag();
public XmlAppendable tag(String tag, Map<String,String> attributes) throws IOException { _out.append(_space).append('<').append(tag); attributes(attributes); _out.append("/>\n"); return this; }
public XmlAppendable tag(String tag,String content) throws IOException { _out.append(_space).append('<').append(tag).append('>'); content(content); _out.append("</").append(tag).append(">\n"); return this; }