Package org.apache.tiles.definition

Examples of org.apache.tiles.definition.DefinitionsFactoryException


            }
          }
          return result;
        }
        catch (IOException ex) {
          throw new DefinitionsFactoryException("Cannot load definition URLs", ex);
        }
      }
      else {
        return super.getSourceURLs(applicationContext, contextFactory);
      }
View Full Code Here


            result.addAll(applicationContext.getResources(definition));
          }
          return result;
        }
        catch (IOException ex) {
          throw new DefinitionsFactoryException("Cannot load definition URLs", ex);
        }
      }
      else {
        return super.getSourceURLs(applicationContext, contextFactory);
      }
View Full Code Here

                    "classpath:/org/apache/tiles/freemarker-classpath-defs.xml"));
            urls.add(applicationContext.getResource(
                "classpath:/org/apache/tiles/velocity-classpath-defs.xml"));
            return urls;
        } catch (IOException e) {
            throw new DefinitionsFactoryException(
                    "Cannot load definition URLs", e);
        }
    }
View Full Code Here

        try {
            urls.add(applicationContext.getResource("/WEB-INF/tiles-alt-defs.xml"));
            urls.add(applicationContext.getResource("/WEB-INF/freemarker/tiles-alt-defs.xml"));
            urls.add(applicationContext.getResource("/WEB-INF/velocity/tiles-alt-defs.xml"));
        } catch (IOException e) {
            throw new DefinitionsFactoryException(
                    "Cannot load definition URLs", e);
        }
        return urls;
    }
View Full Code Here

                    .getResources("/WEB-INF/**/tiles*.xml");
            urlSet.addAll(applicationContext
                    .getResources("classpath*:META-INF/**/tiles*.xml"));
            return URLUtil.getBaseTilesDefinitionURLs(urlSet);
        } catch (IOException e) {
            throw new DefinitionsFactoryException(
                    "Cannot load definition URLs", e);
        }
    }
View Full Code Here

                    Map<String, Definition> defsMap = loadDefinitionsFromURL(newUrl);
                    if (defsMap != null) {
                        localeDefsMap.putAll(defsMap);
                    }
                } catch (MalformedURLException e) {
                    throw new DefinitionsFactoryException("Error parsing URL "
                        + newPath, e);
                }
            }
        }
View Full Code Here

        InputStream input;
        try {
            input = (InputStream) source;
        } catch (ClassCastException e) {
            throw new DefinitionsFactoryException(
                "Invalid source type.  Requires java.io.InputStream.", e);
        }

        try {
            // set first object in stack
            //digester.clear();
            digester.push(this);
            // parse
            digester.parse(input);

        } catch (SAXException e) {
            throw new DefinitionsFactoryException(
                "XML error reading definitions.", e);
        } catch (IOException e) {
            throw new DefinitionsFactoryException(
                "I/O Error reading definitions.", e);
        } finally {
            digester.clear();
        }
View Full Code Here

                Map<String, Definition> defsMap = loadDefinitionsFromURL(newUrl);
                if (defsMap != null) {
                    localeDefsMap.putAll(defsMap);
                }
            } catch (MalformedURLException e) {
                throw new DefinitionsFactoryException("Error parsing URL "
                        + newPath, e);
            }
        }
        Map<String, Definition> defsMap = definitionResolver
                .storeDefinitionPatterns(copyDefinitionMap(localeDefsMap),
View Full Code Here

                    log.warn("Unable to find resources under the name '"
                            + resources[i] + "'");
                }
            }
        } catch (IOException e) {
            throw new DefinitionsFactoryException(
                    "Unable to parse definitions from " + resourceString, e);
        }
    }
View Full Code Here

            // File not found. continue.
            if (log.isDebugEnabled()) {
                log.debug("File " + null + " not found, continue");
            }
        } catch (IOException e) {
            throw new DefinitionsFactoryException(
                    "I/O error processing configuration.", e);
        }

        return defsMap;
    }
View Full Code Here

TOP

Related Classes of org.apache.tiles.definition.DefinitionsFactoryException

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.