Package com.intellij.javaee.model.xml.web

Examples of com.intellij.javaee.model.xml.web.Filter


              final XmlFile webXmlFile = configFile.getXmlFile();
              final WebApp webApp = JamCommonUtil.getRootElement(webXmlFile, WebApp.class, null);
              if (webApp == null) return;
              if (!FileModificationService.getInstance().prepareFileForWrite(webXmlFile)) return;

              final Filter strutsFilter = webApp.addFilter();
              strutsFilter.getFilterName().setStringValue("struts2");

              @NonNls final String filterClass = templateProvider.is21orNewer() ?
                  StrutsConstants.STRUTS_2_1_FILTER_CLASS :
                  StrutsConstants.STRUTS_2_0_FILTER_CLASS;
              strutsFilter.getFilterClass().setStringValue(filterClass);

              final FilterMapping filterMapping = webApp.addFilterMapping();
              filterMapping.getFilterName().setValue(strutsFilter);
              filterMapping.addUrlPattern().setStringValue("/*");
            }
View Full Code Here


    final WebApp webApp = webFacet.getRoot();
    if (webApp == null) {
      return value; // no web.xml
    }

    final Filter filter = ContainerUtil.find(webApp.getFilters(), WEB_XML_STRUTS_FILTER_CONDITION);
    if (filter != null) {
      final ParamValue initParam = ContainerUtil.find(filter.getInitParams(), new Condition<ParamValue>() {
        public boolean value(final ParamValue paramValue) {
          return Comparing.equal(paramValue.getParamName().getStringValue(), name);
        }
      });
      if (initParam != null) {
View Full Code Here

TOP

Related Classes of com.intellij.javaee.model.xml.web.Filter

Copyright © 2018 www.massapicom. 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.