------------- Home.html ------------------ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Tutorial: HelloWorld</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <h1>HelloWorld Tutorial</h1> <p> The current data and time is: <span jwcid="now">June 26 2005</span> </p> </body> </html>
------------- Home.page --------------- <?xml version="1.0"?> <!DOCTYPE page-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd"> <page-specification class="test.Home"> <component id="now" type="Insert"> <binding name="value" value="currentDate"/> </component> </page-specification> ------------- Home.java ----------------- package test; import java.util.Date; import java.util.logging.Logger; import org.apache.tapestry.html.BasePage; public abstract class Home extends BasePage { public Date getCurrentDate(){ return new Date(); } } ---------------- web.xml -------------------- <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>Tutorial: HelloWorld</display-name> <servlet> <servlet-name>app</servlet-name> <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>app</servlet-name> <url-pattern>/app</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>app</welcome-file> </welcome-file-list> </web-app> ----------------------------------------------- That's all! Norbert Robert Zeigler wrote: > > Can't explain without more information about your page. > That said, you can always throw a @Cached annotation on there if needed. > > Robert > > On Jul 18, 2008, at 7/182:20 PM , MBBert wrote: > >> >> Hi! >> >> I set up a new environment with Hibernate, Spring and Tapestry. >> After the >> first tests I wondered why each DB access was done 3 times. >> For verification I set up a simple Hello World App and there is this >> strange >> behaviour also. When I set a break point in the getter method, I can >> see >> that it will be called three times each page access. >> >> Can anybody explain me what happens? >> >> I'm using version 4.1.5 with Apache 6.0.14 in NetBeans 6.0. >> -- >> View this message in context: >> http://www.nabble.com/Tapestry-calls-the-getter-3-times%21-tp18536136p18536136.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> 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] > > > -- View this message in context: http://www.nabble.com/Tapestry-calls-the-getter-3-times%21-tp18536136p18541836.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]