Package org.eclipse.jetty.xml

Examples of org.eclipse.jetty.xml.XmlAppendable.openTag()


        webappAttr.put("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");
        webappAttr.put("xsi:schemaLocation","http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd");
        webappAttr.put("metadata-complete","true");
        webappAttr.put("version","3.1");

        out.openTag("web-app",webappAttr);
        if (_webApp.getDisplayName() != null)
            out.tag("display-name",_webApp.getDisplayName());
       
        // Set some special context parameters
View Full Code Here


        addContextParamFromAttribute(out,MetaInfConfiguration.METAINF_RESOURCES,resourceBase);


        // init params
        for (String p : _webApp.getInitParams().keySet())
            out.openTag("context-param",origin(md,"context-param." + p))
            .tag("param-name",p)
            .tag("param-value",_webApp.getInitParameter(p))
            .closeTag();

        if (_webApp.getEventListeners() != null)
View Full Code Here

            .tag("param-value",_webApp.getInitParameter(p))
            .closeTag();

        if (_webApp.getEventListeners() != null)
            for (EventListener e : _webApp.getEventListeners())
                out.openTag("listener",origin(md,e.getClass().getCanonicalName() + ".listener"))
                .tag("listener-class",e.getClass().getCanonicalName())
                .closeTag();

        ServletHandler servlets = _webApp.getServletHandler();
View Full Code Here

        if (servlets.getFilterMappings() != null)
        {
            for (FilterMapping mapping : servlets.getFilterMappings())
            {
                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)
View Full Code Here

        if (servlets.getServletMappings() != null)
        {
            for (ServletMapping mapping : servlets.getServletMappings())
            {
                out.openTag("servlet-mapping",origin(md,mapping.getServletName() + ".servlet.mappings"));
                out.tag("servlet-name",mapping.getServletName());
                if (mapping.getPathSpecs() != null)
                    for (String s : mapping.getPathSpecs())
                        out.tag("url-pattern",s);
                out.closeTag();
View Full Code Here

        // Security elements
        SecurityHandler security =_webApp. getSecurityHandler();

        if (security!=null && (security.getRealmName()!=null || security.getAuthMethod()!=null))
        {
            out.openTag("login-config");
            if (security.getAuthMethod()!=null)
                out.tag("auth-method",origin(md,"auth-method"),security.getAuthMethod());
            if (security.getRealmName()!=null)
                out.tag("realm-name",origin(md,"realm-name"),security.getRealmName());
View Full Code Here

                out.tag("realm-name",origin(md,"realm-name"),security.getRealmName());


            if (Constraint.__FORM_AUTH.equalsIgnoreCase(security.getAuthMethod()))
            {
                out.openTag("form-login-config");
                out.tag("form-login-page",origin(md,"form-login-page"),security.getInitParameter(FormAuthenticator.__FORM_LOGIN_PAGE));
                out.tag("form-error-page",origin(md,"form-error-page"),security.getInitParameter(FormAuthenticator.__FORM_ERROR_PAGE));
                out.closeTag();
            }
View Full Code Here

        if (security instanceof ConstraintAware)
        {
            ConstraintAware ca = (ConstraintAware)security;
            for (String r:ca.getRoles())
                out.openTag("security-role")
                .tag("role-name",r)
                .closeTag();

            for (ConstraintMapping m : ca.getConstraintMappings())
            {
View Full Code Here

                .tag("role-name",r)
                .closeTag();

            for (ConstraintMapping m : ca.getConstraintMappings())
            {
                out.openTag("security-constraint");

                out.openTag("web-resource-collection");
                {
                    if (m.getConstraint().getName()!=null)
                        out.tag("web-resource-name",m.getConstraint().getName());
View Full Code Here

            for (ConstraintMapping m : ca.getConstraintMappings())
            {
                out.openTag("security-constraint");

                out.openTag("web-resource-collection");
                {
                    if (m.getConstraint().getName()!=null)
                        out.tag("web-resource-name",m.getConstraint().getName());
                    if (m.getPathSpec()!=null)
                        out.tag("url-pattern",origin(md,"constraint.url."+m.getPathSpec()),m.getPathSpec());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.