Results 1 to 10 of 10
  1. #1
    bender86 is offline Member
    Join Date
    May 2012
    Posts
    5
    Rep Power
    0

    Default configure tiles with maven

    Hi,

    I'm starting to learn maven and i want to use tiles on my application.
    I use too maven and spring 3.0.5.
    I did with success a simple helloWorld and now want implement tiles with this tutorial: Tutorial: Spring 3 MVC Tiles Integration with Example in Eclipse. Tiles Spring Tutorial

    When i set the the line below in my web.xml, i've an error 404 when i compile under tomcat7
    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             id="WebApp_ID" version="2.5">
        <display-name>learning spring</display-name>
    
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>WEB-INF/dispatcher-servlet.xml</param-value>
        </context-param>
        
        <!-- défini le fichier qui sera lancé par défaut 
        par défaut c'est index.jsp se trouvant dans webapp-->
    	<welcome-file-list>
            <welcome-file>/WEB-INF/jsp/hello.jsp</welcome-file>
        </welcome-file-list>
        
        <servlet>
            <servlet-name>dispatcher</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <!-- ***************spécifie le xml où se trouve tiles********** -->
        <servlet>
        <servlet-name>tiles</servlet-name>
        <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
        <init-param>
            <param-name>
              org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
            </param-name>
            <param-value>
              /WEB-INF/tiles.xml
            </param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
    	<!-- Here is the problem if i uncoment
        <listener>
    		<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
    	</listener>-->
        
    	<!-- 
        nom du fichier de config xml (dispatche-servlet.xml
         -->
        <servlet-mapping>
            <servlet-name>dispatcher</servlet-name>
            <url-pattern>/</url-pattern>
        </servlet-mapping>
    
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <listener>
            <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
        </listener>
    
    </web-app>
    The same error when i put this in my dispatcher-servlet.xml
    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.0.xsd">
        <context:annotation-config/>
        <!-- 
        Ce fichier placé dans le dossier WEB-INF (identique au dossier du fichier web.xml), 
        va indiquer à Spring de rechercher les annotations dans les codes sources.
    
    Du coup, nous n’aurons plus besoin de déclarer nos contrôleurs dans ce fichier.
    
    Le balise   <context:component-scan base-package= »com.irontech.testapp.controller »/> 
    indique à Spring de rechercher des annotations dans les classes situées dans le package com.irontech.testapp.controller. 
    Il est possible dans spécifier plusieurs en les séparant par des virgules
         -->
        <context:component-scan base-package="learning.start.controller"/>
        
    
        <bean id="viewResolver"
              class="org.springframework.web.servlet.view.UrlBasedViewResolver">
            <!--<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> -->
            <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
            <property name="prefix" value="/WEB-INF/jsp/"/>
            <property name="suffix" value=".jsp"/>
        </bean>
        
        <!--
        Here is the probleme if i uncoment
        <bean id="tilesConfigurer"
    	class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
    	        <property name="definitions">
    	                <list>
    	                        <value>/WEB-INF/app-tiles.xml</value>
    	                </list>
    	        </property>
    	</bean>-->
        
        <!-- <bean class= "org.springframework.web.servlet.view.tiles2.TilesViewResolver"/>-->
        
        <bean class="org.springframework.web.servlet.view.tiles2.TilesViewResolver">      
    	    <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>                
    	</bean>
        
    </beans>
    Maybe i miss a dependency in my pom.xml

    Java Code:
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>start</groupId>
      <artifactId>learning</artifactId>
      <packaging>war</packaging>
      <version>0.0.1-SNAPSHOT</version>
      <name>learning Maven Webapp</name>
      <url>http://maven.apache.org</url>
      
      <properties>
            <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
        </properties>
        
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
          <version>2.5</version>
          <scope>provided</scope>
      </dependency>
      <!-- ========struts==============-->
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-extras</artifactId>
            <version>2.2.2</version>
            <type>pom</type>
            <scope>compile</scope>
        </dependency>
      
      
      
      <dependency>
         <groupId>org.apache.struts</groupId>
      	 <artifactId>struts-tiles</artifactId>
         <version>1.3.10</version>
       </dependency>
       
       <dependency>
    		<groupId>org.apache.struts</groupId>
    		<artifactId>struts2-tiles-plugin</artifactId>
    		<version>2.3.1.2</version>
    	</dependency>
       <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>2.2.1</version>
        </dependency>
    
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-spring-plugin</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
           <groupId>org.apache.struts</groupId>
           <artifactId>struts-tiles</artifactId>
           <version>1.3.9</version>
           <scope>runtime</scope>
       </dependency>
    
       <!-- ========tiles pour templates de page-->
    	<dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-api</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-jsp</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-servlet</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-template</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-core</artifactId>
            <version>2.2.2</version>
         </dependency>
         
         <dependency>
    		<groupId>commons-beanutils</groupId>
    		<artifactId>commons-beanutils</artifactId>
    		<version>20030211.134440</version>
    	</dependency>
    	<dependency>
    		<groupId>commons-digester</groupId>
    		<artifactId>commons-digester</artifactId>
    		<version>2.1</version>
    	</dependency>
    	<dependency>
    		<groupId>org.slf4j</groupId>
    		<artifactId>slf4j-api</artifactId>
    		<version>1.6.4</version>
    	</dependency>
    	<dependency>
    	<groupId>org.slf4j</groupId>
    	<artifactId>slf4j-log4j12</artifactId>
    	<version>1.6.4</version>
    </dependency>
                
      <!-- ********indispensable pour les page jsp -->
      <dependency>
           <groupId>jstl</groupId>
           <artifactId>jstl</artifactId>
           <version>1.1.2</version>
       </dependency>
        <!--==========Spring==========-->
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${org.springframework.version}</version>
            <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <finalName>learning</finalName>
        <plugins>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>tomcat-maven-plugin</artifactId>
                 <configuration>
                     <url>http://localhost:8080/manager/html</url>
                     <server>tomcat7</server>
                 </configuration>
             </plugin>
         </plugins>
      </build>
    </project>
    How can i do to solve this?

    Sorry for my basic english and thanks for your help

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: configure tiles with maven

    Look in your Tomcat logs and try and see if there's a stack trace, exception, that sort of thing.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    bender86 is offline Member
    Join Date
    May 2012
    Posts
    5
    Rep Power
    0

    Default Re: configure tiles with maven

    Hi,

    Thanks for your reply and i watched the log from tomcat but i'm a starter in java programming and i've a lot of difficult to interpret the log.

    8 mai 2012 20:09:20 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    8 mai 2012 20:09:20 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:irontech-project' did not find a matching property.
    8 mai 2012 20:09:20 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:learning' did not find a matching property.
    8 mai 2012 20:09:21 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    8 mai 2012 20:09:21 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    8 mai 2012 20:09:21 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 671 ms
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardService startInternal
    INFO: Démarrage du service Catalina
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: See SLF4J Error Codes for further details.
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListe ner
    java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
    at org.slf4j.LoggerFactory.getSingleton(LoggerFactory .java:223)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:12 0)
    at org.slf4j.LoggerFactory.performInitialization(Logg erFactory.java:111)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFa ctory.java:269)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.ja va:242)
    at org.apache.commons.logging.impl.SLF4JLogFactory.ge tInstance(SLF4JLogFactory.java:155)
    at org.apache.commons.logging.impl.SLF4JLogFactory.ge tInstance(SLF4JLogFactory.java:131)
    at org.apache.commons.logging.LogFactory.getLog(LogFa ctory.java:685)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:184)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4765)
    at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5260)
    at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1688)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1533)
    ... 20 more
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Error listenerStart
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Erreur de démarrage du contexte [/irontech-project] suite aux erreurs précédentes
    8 mai 2012 20:09:21 org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext listenerStop
    GRAVE: Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) à l'instance de classe d'écoute org.springframework.web.context.ContextLoaderListe ner
    java.lang.ExceptionInInitializerError
    at org.springframework.web.context.ContextLoaderListe ner.contextDestroyed(ContextLoaderListener.java:80 )
    at org.apache.catalina.core.StandardContext.listenerS top(StandardContext.java:4805)
    at org.apache.catalina.core.StandardContext.stopInter nal(StandardContext.java:5453)
    at org.apache.catalina.util.LifecycleBase.stop(Lifecy cleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:160)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.IllegalStateException: org.slf4j.LoggerFactory could not be successfully initialized. See also SLF4J Error Codes
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFa ctory.java:276)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.ja va:242)
    at org.apache.commons.logging.impl.SLF4JLogFactory.ge tInstance(SLF4JLogFactory.java:155)
    at org.apache.commons.logging.impl.SLF4JLogFactory.ge tInstance(SLF4JLogFactory.java:131)
    at org.apache.commons.logging.LogFactory.getLog(LogFa ctory.java:685)
    at org.springframework.web.context.ContextCleanupList ener.<clinit>(ContextCleanupListener.java:43)
    ... 12 more
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) org.apache.struts2.tiles.StrutsTilesListener
    java.lang.NoClassDefFoundError: org/apache/tiles/web/startup/TilesListener
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader. java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java :615)
    at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
    at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2823)
    at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1160)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1655)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1533)
    at org.apache.catalina.core.DefaultInstanceManager.lo adClass(DefaultInstanceManager.java:525)
    at org.apache.catalina.core.DefaultInstanceManager.lo adClassMaybePrivileged(DefaultInstanceManager.java :507)
    at org.apache.catalina.core.DefaultInstanceManager.ne wInstance(DefaultInstanceManager.java:124)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4701)
    at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5260)
    at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild. call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: org.apache.tiles.web.startup.TilesListener
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1688)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1533)
    ... 21 more
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: L''installation des écouteurs (listeners) de l''application a été sautée suite aux erreurs précédentes
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Error listenerStart
    8 mai 2012 20:09:21 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Erreur de démarrage du contexte [/learning] suite aux erreurs précédentes
    8 mai 2012 20:09:21 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    8 mai 2012 20:09:21 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    8 mai 2012 20:09:21 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 756 ms

    thanks

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: configure tiles with maven

    Caused by: java.lang.ClassNotFoundException: org.apache.tiles.web.startup.TilesListener

    Looks to me like you're missing whatever jar file contains that class.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    bender86 is offline Member
    Join Date
    May 2012
    Posts
    5
    Rep Power
    0

    Default Re: configure tiles with maven

    thanks for your help but if i look for the necessary jar who has this class : org.apache.tiles.web.startup.TilesListener

    I muss having tiles-core and it is in my pom.xml
    Java Code:
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>start</groupId>
      <artifactId>learning</artifactId>
      <packaging>war</packaging>
      <version>0.0.1-SNAPSHOT</version>
      <name>learning Maven Webapp</name>
      <url>http://maven.apache.org</url>
      
      <properties>
            <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
        </properties>
        
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
          <version>2.5</version>
          <scope>provided</scope>
      </dependency>
      <!-- ========struts==============-->
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-extras</artifactId>
            <version>2.2.2</version>
            <type>pom</type>
            <scope>compile</scope>
        </dependency>
      
      
      
      <dependency>
         <groupId>org.apache.struts</groupId>
      	 <artifactId>struts-tiles</artifactId>
         <version>1.3.10</version>
       </dependency>
       
       <dependency>
    		<groupId>org.apache.struts</groupId>
    		<artifactId>struts2-tiles-plugin</artifactId>
    		<version>2.3.1.2</version>
    	</dependency>
       <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>2.2.1</version>
        </dependency>
    
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-spring-plugin</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
           <groupId>org.apache.struts</groupId>
           <artifactId>struts-tiles</artifactId>
           <version>1.3.9</version>
           <scope>runtime</scope>
       </dependency>
    
       <!-- ========tiles pour templates de page-->
    	<dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-api</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-jsp</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-servlet</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-template</artifactId>
            <version>2.2.2</version>
         </dependency>
         <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-core</artifactId>
            <version>2.2.2</version>
         </dependency>
         
         <dependency>
    		<groupId>commons-beanutils</groupId>
    		<artifactId>commons-beanutils</artifactId>
    		<version>20030211.134440</version>
    	</dependency>
    	<dependency>
    		<groupId>commons-digester</groupId>
    		<artifactId>commons-digester</artifactId>
    		<version>2.1</version>
    	</dependency>
    
    	 <dependency>
    		<groupId>org.slf4j</groupId>
    		<artifactId>slf4j-api</artifactId>
    		<version>1.6.4</version>
    	</dependency>
    	<dependency>
    	<groupId>org.slf4j</groupId>
    	<artifactId>slf4j-log4j12</artifactId>
    	<version>1.6.4</version>
    </dependency>
                
      <!-- ********indispensable pour les page jsp -->
      <dependency>
           <groupId>jstl</groupId>
           <artifactId>jstl</artifactId>
           <version>1.1.2</version>
       </dependency>
        <!--==========Spring==========-->
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${org.springframework.version}</version>
            <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <finalName>learning</finalName>
        <plugins>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>tomcat-maven-plugin</artifactId>
                 <configuration>
                     <url>http://localhost:8080/manager/html</url>
                     <server>tomcat7</server>
                 </configuration>
             </plugin>
         </plugins>
      </build>
    </project>
    so i'm disapointed

    Here is my log
    Java Code:
    9 mai 2012 17:43:27 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    9 mai 2012 17:43:28 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:irontech-project' did not find a matching property.
    9 mai 2012 17:43:28 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:learning' did not find a matching property.
    9 mai 2012 17:43:28 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    9 mai 2012 17:43:28 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    9 mai 2012 17:43:28 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2485 ms
    9 mai 2012 17:43:28 org.apache.catalina.core.StandardService startInternal
    INFO: Démarrage du service Catalina
    9 mai 2012 17:43:28 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    9 mai 2012 17:43:30 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener
    java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
    	at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
    	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
    	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
    	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
    	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
    	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    	... 20 more
    9 mai 2012 17:43:30 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Error listenerStart
    9 mai 2012 17:43:30 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Erreur de démarrage du contexte [/irontech-project] suite aux erreurs précédentes
    9 mai 2012 17:43:30 org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    9 mai 2012 17:43:30 org.apache.catalina.core.StandardContext listenerStop
    GRAVE: Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) à l'instance de classe d'écoute org.springframework.web.context.ContextLoaderListener
    java.lang.ExceptionInInitializerError
    	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:80)
    	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4805)
    	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5453)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.IllegalStateException: org.slf4j.LoggerFactory could not be successfully initialized. See also http://www.slf4j.org/codes.html#unsuccessfulInit
    	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:276)
    	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
    	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    	at org.springframework.web.context.ContextCleanupListener.<clinit>(ContextCleanupListener.java:43)
    	... 12 more
    9 mai 2012 17:43:31 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: Erreur lors de la configuration de la classe d'écoute de l'application (application listener) org.apache.struts2.tiles.StrutsTilesListener
    java.lang.NoClassDefFoundError: org/apache/tiles/web/startup/TilesListener
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823)
    	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
    	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: org.apache.tiles.web.startup.TilesListener
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    	... 21 more
    9 mai 2012 17:43:31 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: L''installation des écouteurs (listeners) de l''application a été sautée suite aux erreurs précédentes
    9 mai 2012 17:43:31 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Error listenerStart
    9 mai 2012 17:43:31 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Erreur de démarrage du contexte [/learning] suite aux erreurs précédentes
    9 mai 2012 17:43:31 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    9 mai 2012 17:43:31 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    9 mai 2012 17:43:31 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2721 ms
    Maybe i miss an other dependency in my pom?
    Are there an importance to put the dependency in the pom in a certain order?

    Thanks for your help

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: configure tiles with maven

    And?
    Just because it is in your POM does not mean it is automatically deployed to your server.
    I have no idea how you are deploying this, but I would check in your war file or your deployment in webapps and see if the jar is in there.
    If not then you need to figure out what is wrong with your deployment procedure.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    bender86 is offline Member
    Join Date
    May 2012
    Posts
    5
    Rep Power
    0

    Default Re: configure tiles with maven

    As you can see i'm a noob.
    Why is it not deployed if it's in my pom
    I went in the properties of my project and then go to java build path and checked Maven Dependencies
    If i look the libraries tab, i see the tiles-core-2.2.2.jar

    Where is my war file?

    Thanks again for your help

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: configure tiles with maven

    Your POM simply lists your dependencies, so that Maven knows what libraries are needed to build the project.
    Building is not running, or deploying.
    If you don't know about how things are deployed to a web server then I suggest you read up on that for whatever IDE/framework/server you have, possibly also just reading up on the basic structure of a Java web application. It's not something we can really do here without writing a whole tutorial.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #9
    bender86 is offline Member
    Join Date
    May 2012
    Posts
    5
    Rep Power
    0

    Default Re: configure tiles with maven

    so i've to download the necessary jar and put it somewhere in my project?
    Do you have a good tutorial for me?

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: configure tiles with maven

    I'm sure the Maven site has some documentation you can use to run through what needs doing.
    Some of it will be dependent on what other things you;re using.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Plotting Map Tiles
    By RDReavis in forum Java 2D
    Replies: 2
    Last Post: 06-06-2010, 07:16 PM
  2. Adding Tiles
    By Rubics in forum Java Applets
    Replies: 1
    Last Post: 08-03-2009, 04:25 AM
  3. Replies: 0
    Last Post: 04-20-2009, 06:26 PM
  4. struts tiles
    By sasikumarm in forum Web Frameworks
    Replies: 0
    Last Post: 03-27-2008, 02:36 PM
  5. Tiles in JSF
    By Heather in forum SWT / JFace
    Replies: 2
    Last Post: 06-30-2007, 03:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •