Announcement Announcement Module
Collapse
No announcement yet.
Spring MVC 2.5.6 and Apache Tiles 2.1 (TilesConfigurer) Not Working! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring MVC 2.5.6 and Apache Tiles 2.1 (TilesConfigurer) Not Working!

    Hi guys I am using spring MVC 2.5.6 and Apache tiles 2.1.1 (I was using 2.0.6 previously) . I get the a ClassNotFound Exception: ServletTilesContextFactory etc..... When I tried to include this new updated version.
    This is because the TlesConfigurer class is using SEVERAL deprecated parameters for the servlet initialization. for example:

    public TilesConfigurer() {
    this.tilesPropertyMap.put(
    TilesContainerFactory.CONTAINER_FACTORY_INIT_PARAM ,//deprecated
    TilesContainerFactory.class.getName());
    this.tilesPropertyMap.put(
    TilesContainerFactory.CONTEXT_FACTORY_INIT_PARAM,//deprecated
    ChainedTilesContextFactory.class.getName());
    this.tilesPropertyMap.put(
    TilesContainerFactory.DEFINITIONS_FACTORY_INIT_PAR AM,
    UrlDefinitionsFactory.class.getName());
    this.tilesPropertyMap.put(
    TilesContainerFactory.PREPARER_FACTORY_INIT_PARAM,
    BasicPreparerFactory.class.getName());
    this.tilesPropertyMap.put(
    ChainedTilesContextFactory.FACTORY_CLASS_NAMES,
    ServletTilesContextFactory.class.getName() + "," + JspTilesContextFactory.class.getName());//deprecated. ServletTilesContextFactory and JspTilesContextFactory are not even included in the 2.1 version
    this.tilesPropertyMap.put(
    UrlDefinitionsFactory.LOCALE_RESOLVER_IMPL_PROPERT Y,
    SpringLocaleResolver.class.getName());
    }

    protected TilesContainer createTilesContainer(ServletContext context) throws TilesException {
    ServletContextAdapter adaptedContext = new ServletContextAdapter(new DelegatingServletConfig());//deprecated ServletContextAdapter is not in the 2.1 version
    TilesContainerFactory factory = TilesContainerFactory.getFactory(adaptedContext);
    return factory.createContainer(adaptedContext);
    }

    Any Ideas on how to reconfigure the TilesConfigurer for the 2.1 Apache tiles version.

    Any help would be appreciated by the community. There is nothing in google explaining this deprecation change!!!

    Thankx
Working...
X