Announcement Announcement Module
Collapse
No announcement yet.
Spring 2.5.6 + tiles 2.2.2 + jboss 5 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 2.5.6 + tiles 2.2.2 + jboss 5

    Hi all

    I'm trying to mount an application with Spring + tiles. I'm deploying the war file into a jboss 5.0.1 AS.

    When I add tiles definition on my appContext file seems that jboss isn't able to finish startup process. This is the last output log:

    Code:
    09:42:16,099 INFO  [XmlWebApplicationContext] Bean factory for application context [[email protected]15db507]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1e69671
    09:42:16,177 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1e69671: defining beans [tilesConfigurer]; root of factory hierarchy
    09:42:16,333 INFO  [TilesConfigurer] TilesConfigurer: adding definitions [/WEB-INF/tiles-defs/myTilesConfigFile.xml]
    My appContext file is:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans default-autowire="byName"
            xmlns="http://www.springframework.org/schema/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    
        <!-- Include the configuration files of the other components -->
        	<bean id="tilesConfigurer" 
    		class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
    		<property name="definitions">
    			<list><value>/WEB-INF/tiles-defs/myTilesConfigFile.xml</value>
    			</list>
    		</property>
    	</bean>
    </beans>
    My tiles defs file is:
    Code:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE tiles-definitions PUBLIC
           "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
           "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
    
    <tiles-definitions>
        <!-- Default Main Template -->
    	<definition name="mainTemplate" template="/WEB-INF/templates/template01.tpt">
    		<put-attribute name="title" value="Simple Tiles 2 Example" type="string" />
    		<put-attribute name="header" value="header" />
    		<put-attribute name="footer" value="footer" />
    		<put-attribute name="menu" value="leftMenu" />
    	</definition>
    
    	<definition name="main" extends="mainTemplate">
    		<put-attribute name="content" value="blank" />  
    	</definition>
    </tiles-definitions>
    Anyone had this problem before?
    Any help?

  • #2
    I just try with Spring 3 and is working fine....

    Comment


    • #3
      Now I have another problem...

      This is the code for my index page:
      Code:
      <%@ include file="/WEB-INF/jsp/include.jsp" %>
      
      <tiles:insertDefinition name="main"/>
      
      <script src = "<%=request.getContextPath()%>/js/main.js"></script>
      And this is the server response (code):
      Code:
      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
          pageEncoding="ISO-8859-1"%>
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      
      <html>
      	<head><title><tiles:getAsString name="title"/></title>
      	<link rel="stylesheet" type="text/css" href="<core:url value="/css/main.css"/>" />
      </head>
      	<body>
      	<table>
            <tr>
              <td colspan="2"><tiles:insertAttribute name="header"/></td>
            </tr>
            <tr>
              <td><tiles:insertAttribute name="menu"/></td>
              <td>
                <tiles:insertAttribute name="content"/>
              </td>
            </tr>
            <tr>
              <td colspan="2">
                <tiles:insertAttribute name="footer"/>
              </td>
            </tr>
          </table>	
      	</body>
      </html>
      <script src = "<%=request.getContextPath()%>/js/template01.js"></script>
      <script src = "/eurocop/js/main.js"></script>
      I forgot to configure something?

      Comment

      Working...
      X