webtier@glassfish.java.net

Re: [webtier] JSF 2.0 on Jetty

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Tue, 13 Oct 2009 11:16:46 -0700

On 10/13/09 11:10 AM, Martin Beránek wrote:
>> On 10/13/09 12:36 AM, Martin Beránek wrote:
>>
>>> Hello,
>>>
>>> I am new to this group. Since I use only JSF 1.2 (myfaces impl) with facelets.
>>>
>>> We are using Jetty as embedded container in our app. With jsf1.2 it works fine. I am trying migrate to jsf2 (bacause of new features, cleaner code, integreted facelets, ...).
>>>
>>> BUT, jsf anotations didn't work. I am staring server like this:
>>>
>>> Server server = new Server(8080);
>>> WebAppContext webapp = new WebAppContext("web","/");
>>> server.setHandler(webapp);
>>> server.start();
>>> server.join();
>>>
>>> I tried to debug initialization process of JSF, but it's too large to find proper lines.
>>>
>>> thanks for help
>>>
>>>
>>>
>> Need to know which version/implementation of JSF 2.0 that you're using.
>>
>>
> i am using mojarra-2.0.0-RC and jetty-6.1.21 with jetty-annotations and jetty-plus on classpath (as i read somewhere on internet, these two addons might be necessary)
>
>
RC2 is the latest and would recommend your using that. As far as
embedded scenarios are concerned, for annotated classes not contained
within a JAR file, you will need to have some semblance of standard web
application directory structure as we rely on
ServletContext.getResourcePaths("/WEB-INF/classes/") in order to scan
for annotations.