Roy,

Have you created the hivemind.xml file, the XSpringBeanFactoryHolderImpl.java and the XWebApplicationContextUtils.java as described in the wiki. These files provide the bridge between the Spring and Tapestry system.

Hope this helps

Paul


McBrayer, Roy <[EMAIL PROTECTED]> wrote:

I am trying to use Spring with Tapestry 4 per the instructions at
Tapestry4Spring - http://wiki.apache.org/jakarta-tapestry/Tapestry4Spring .

I have created the Home.html page and Home.page . Also have created the
web.xml and applicationContext.xml.

All are shown below.  Both Home.html and Home.page are located under the
application directory in the  Tomcat Home/webapps directory.  I also have
Person class in WEB-INF\classes\com\example\model .  This is being found by
Spring based on the Tomcat logs.

No errors are generated when Tomcat starts and Spring appears to be
initializing correctly but I get no output from Tapestry to the Home.html
web page.  I have verified that I have all required Tapestry jar files. What
else do I need to do?


------------------------
Home.html



-------------------
Home.page

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE page-specification PUBLIC
       "-//Apache Software Foundation//Tapestry Specification 3.1//EN"
       "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_1.dtd";>

<page-specification class="org.apache.tapestry.html.BasePage">
       <inject property="person" object="spring:person" />
</page-specification>


---------------------------
Web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
        xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>



<context-param>
       <param-name>contextConfigLocation</param-name>
       <param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
       <listener-class>
               org.springframework.web.context.ContextLoaderListener
       </listener-class>
</listener>
</web-app>

------------------------------

applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
       "http://www.springframework.org/dtd/spring-beans.dtd";>

<beans>
       <bean id="person" class="com.example.model.Person">
       <property name="name">
               <value>Nanda Firdausi</value>
       </property>
       </bean>
</beans>
-----------------------
Person.java

package com.example.model;

public class Person {
        private String name;

        public String getName() {

                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to