tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Luis Cetina <maxtorz...@gmail.com>
Subject Re: Simple JSF+CDI app is not working
Date Tue, 02 Oct 2012 14:30:48 GMT
Do you create the beans.xml file?
El 02/10/2012 09:26, "DonatasCiuksys" <donatas.ciuksys@mitsoft.lt> escribió:

> Env: Windows 7, Java 1.7.0_07
>
> Steps to reproduce:
>
> 1. Download Tomee 1.5.0 ZIP, unzip to some folder.
> 2. Setup CATALINA_HOME variable pointing to the same folder.
> 3. Put the file TomeeTest.war (attached) to /webapps folder
> 3. Execute startup.bat (tomme starts up OK, http://localhost:8080/tomee is
> visible and functions OK, all the tests are OK)
> 4. Point browser to http://localhost:8080/TomeeTest/
> 5. Page loads, renders only: "Current date is:" without actual date.
>
> index.xhtml contains:
>     <h:body>
>         Current date is: #{dateBean.currentDate()}
>     </h:body>
>
> DateBean.java contains:
>
> @Named
> @RequestScoped
> public class DateBean {
>
>     @PostConstruct
>     private void init() {
>         System.out.println("INIT: " + this);
>     }
>
>     @PreDestroy
>     private void die() {
>         System.out.println("DIE: " + this);
>     }
>
>     public String currentDate() {
>         System.out.println("Method was called...");
>         return "" + new Date();
>     }
>
> }
>
> What am I doing wrong?
>
> TomeeTest.war
> <http://openejb.979440.n4.nabble.com/file/n4657748/TomeeTest.war>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Simple-JSF-CDI-app-is-not-working-tp4657748.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message