dev@javaserverfaces.java.net

Re: Mojarra PR2 samples in Tomcat?

From: Jim Driscoll <Jim.Driscoll_at_Sun.COM>
Date: Sun, 08 Feb 2009 11:06:46 -0800

Hi David -

I haven't tried the new version on Tomcat - I'll put that on our to do
list to look at shortly, and get back to you.

Jim

On 2/7/09 11:52 AM, David Geary wrote:
> Hi Jim,
>
> I'm trying to get the basic-ezcomp samples with PR2 running in Tomcat
> 6.0.16. I added javax.annotation.jar from the glassfish distribution
> to my WEB-INF/lib (along with jsf-api.jar and jsf-impl.jar from PR2).
> I needed javax.annotation.jar to get Eclipse to quit complaining that
> it couldnt find the PostConstruct class (the complaint, of course, is
> valid w/o the jar file). However, when I run in Tomcat, the
> PostConstruct method is never invoked. To get the basic-ezcomp demos
> to run, I had to modify DemoResourceBean.java to do this...
>
> public Collection<DemoBean> getDemoBeans() {
> buildDemoMetaData(); // I HAD TO ADD THIS LINE
> return demoBeans;
>
> }
>
> ...otherwise I get a blank table on index.xhtml.
>
> Do you know what I need to do in Tomcat to get the PostConstruct
> method to be called? btw, it would be nice if there was some
> documentation that told people how to use Mojarra PR2 on Tomcat 6.X.
>
> Thanks,
>