Package org.springframework.web.context.support

Examples of org.springframework.web.context.support.ServletContextResourcePatternResolver


     *
     * @param servletContext The servlet context.
     */
    public WildcardServletApplicationContext(ServletContext servletContext) {
        super(servletContext);
        resolver = new ServletContextResourcePatternResolver(servletContext);
    }
View Full Code Here


     *
     * @param servletContext The servlet context.
     */
    public SpringWildcardServletTilesApplicationContext(ServletContext servletContext) {
        super(servletContext);
        resolver = new ServletContextResourcePatternResolver(servletContext);
    }
View Full Code Here

     *
     * @param servletContext The servlet context.
     */
    public WildcardServletApplicationContext(ServletContext servletContext) {
        super(servletContext);
        resolver = new ServletContextResourcePatternResolver(servletContext);
    }
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public void initialize(ServletContext context) {
        super.initialize(context);

        resolver = new ServletContextResourcePatternResolver(context);
    }
View Full Code Here

        if (getLogger().isDebugEnabled()) {
            getLogger().debug("Processing component configurations.");
            getLogger().debug("Trying to read properties from directory: " + this.location);
        }
        final Properties mergedProps = new Properties();
        final ServletContextResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
        // final Resource dirResource = resourceLoader.getResource(this.location);

        try {
            Resource[] resources = resolver.getResources(this.location + "/*.properties");
            if (resources != null) {
                Arrays.sort(resources, ResourceUtils.getResourceComparator());
                for (int i = 0; i < resources.length; i++) {
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("Reading property file: " + resources[i]);
View Full Code Here

        final BeanFactory beanFactory = this.treeBuilder.getWebApplicationContext();
        if ( beanFactory instanceof ApplicationContext && node.getInterpreter().getScriptExtension() != null ) {
            final ResourceLoader resourceLoader = (ApplicationContext)beanFactory;
            final String scriptLocation = config.getAttribute("location", DEFAULT_FLOW_SCRIPT_LOCATION);
            if ( resourceLoader.getResource(scriptLocation).exists() ) {
                final ServletContextResourcePatternResolver resolver = new ServletContextResourcePatternResolver(resourceLoader);
                final Resource[] resources = resolver.getResources(scriptLocation + "/*" + node.getInterpreter().getScriptExtension());
                if ( resources != null ) {
                    for(int i=0; i < resources.length; i++) {
                        node.getInterpreter().register(ResourceUtils.getUri(resources[i]));
                    }
                }
View Full Code Here

    throws Exception {
        if (resourceLoader == null) {
            throw new IllegalArgumentException("ResourceLoader not set!");
        }
        this.isRootContext = parentInfo == null;
        this.resolver = new ServletContextResourcePatternResolver(resourceLoader);

        // now add selectors from parent
        if (parentInfo != null) {
            this.configInfo = new ConfigurationInfo(parentInfo);
View Full Code Here

  /**
   * Class constructor.
   */
  public MockWebApplicationContext(ServletContext servletContext) {
    this.servletContext = servletContext;
    this.resourcePatternResolver = new ServletContextResourcePatternResolver(servletContext);
  }
View Full Code Here

     * This implementation supports pattern matching in unexpanded WARs too.
     * @see ServletContextResourcePatternResolver
     */
    @Override
    protected ResourcePatternResolver getResourcePatternResolver() {
        return new ServletContextResourcePatternResolver(this);
    }
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public void initialize(ServletContext context) {
        super.initialize(context);

        resolver = new ServletContextResourcePatternResolver(context);
    }
View Full Code Here

TOP

Related Classes of org.springframework.web.context.support.ServletContextResourcePatternResolver

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.