Skip to main content

[webtier] JSF 2.0 - Specification

9 replies [Last post]
hpollak
Offline
Joined: 2010-01-14

Hey there!!

I'm new on the board and also new on JSF 2.0.

I'm using Netbeans 6.8 and try to write a little webapplication using
EJBs and JSF 2.0.

I'd like to separate Navigation-rules from the faces-config.xml.

so I write a:
faces-config.xml containing application-Section placed in /WEB-INF and
a navigation.faces-config.xml placed in /META-INF.

As described in: Proposed Final Draft from JavaServer™ Faces
Specification in section 11.4.2.
...
* Search for all resources that match either
“META-INF/faces-config.xml” or the end with “.faces-config.xml”
directly in the “META-INF” directory. Each resource that matches that
expression must be considered an application configuration resource.
...

this should work or I wrong?

When I add javax.faces.CONFIG-FILES context parameter with
/META-INF/navigation.faces.config.xml every thing is ok.

Did I misunderstood something?

Thanks
Harry

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Celinio Fernandes

Hi,
a quick question:
does JSF 2.0 support JSP 2.2 yet ?
If not, how much is missing ? which functionalities of JSP 2.2 are not implemented in JSP 2.0 yet ?

Thanks

[att1.html]

Felipe Gaúcho

afaik, JSF2+ should not use JSP anymore...........

On Sun, Feb 28, 2010 at 9:40 AM, Celinio Fernandes
wrote:

> Hi,
> a quick question:
> does JSF 2.0 support JSP 2.2 yet ?
> If not, how much is missing ? which functionalities of JSP 2.2 are not
> implemented in JSP 2.0 yet ?
>
> Thanks
>
>

--
------------------------------------------
Felipe Gaúcho
10+ Java Programmer
CEJUG Senior Advisor
[att1.html]

Celinio Fernandes

I know but it is still possible to use JSP and that is why I would like to know if the latest version of JSP (2.2) is supported, and if yes, how much.

--- On Sun, 2/28/10, Felipe Gaúcho wrote:

From: Felipe Gaúcho
Subject: Re: [webtier] JSF 2.0 compatibility with JSP 2.2
To: webtier@glassfish.dev.java.net
Date: Sunday, February 28, 2010, 3:44 PM

afaik, JSF2+ should not use JSP anymore...........

On Sun, Feb 28, 2010 at 9:40 AM, Celinio Fernandes
wrote:

Hi,
a quick question:
does JSF 2.0 support JSP 2.2 yet ?
If not, how much is missing ? which functionalities of JSP 2.2 are not implemented in JSP 2.0 yet ?

Thanks

--
------------------------------------------
  Felipe Gaúcho
  10+ Java Programmer
  CEJUG Senior Advisor

[att1.html]

Celinio Fernandes

Hi,
I read that many people use these 2 expressions indifferently although I know there is a difference between them.
How would you define a backing bean, as opposed to a managed bean ?

Thanks.

[att1.html]

Jan-Kees van Andel

Hi,

A managed bean is a bean that is managed by the JSF runtime or, from Java EE
6, managed by CDI. We're talking about a part of the JSF spec here.

A backing bean is a "design pattern"/concept, where managed beans are used
as the "backing" code behind a JSF view. Backing beans in JSF are
recommended to be request scoped and contain all data and logic related to a
single view.

Note that the backing bean concept is also utilized in .NET, I believe they
call it code behind, but I'm not sure about this name...

So, you can't really define a "backing bean", but this is something you need
to express through convention in your project. For example, by putting all
backing beans in some package or by using a "BackingBean" suffix in the
class name. Note that there are synonyms for Backing Bean, like Page Bean,
but Backing Bean is the defacto convention.

Regards,
Jan-Kees

2010/2/28 Celinio Fernandes

> Hi,
> I read that many people use these 2 expressions indifferently although I
> know there is a difference between them.
> How would you define a backing bean, as opposed to a managed bean ?
>
> Thanks.
>
>
[att1.html]

Celinio Fernandes

thanks for this explanation.
I also found another explanation here :
http://groundside.com/blog/DuncanMills.php?p=457&more=1&c=1&tb=1&pb=1

--- On Sun, 2/28/10, Jan-Kees van Andel wrote:

From: Jan-Kees van Andel
Subject: Re: [webtier] Difference between managed bean and backing bean ?
To: webtier@glassfish.dev.java.net
Date: Sunday, February 28, 2010, 5:56 PM

Hi,

A managed bean is a bean that is managed by the JSF runtime or, from Java EE 6, managed by CDI. We're talking about a part of the JSF spec here.

A backing bean is a "design pattern"/concept, where managed beans are used as the "backing" code behind a JSF view. Backing beans in JSF are recommended to be request scoped and contain all data and logic related to a single view.

Note that the backing bean concept is also utilized in .NET, I believe they call it code behind, but I'm not sure about this name...

So, you can't really define a "backing bean", but this is something you need to express through convention in your project. For example, by putting all backing beans in some package or by using a "BackingBean" suffix in the class name. Note that there are synonyms for Backing Bean, like Page Bean, but Backing Bean is the defacto convention.

Regards,
Jan-Kees

2010/2/28 Celinio Fernandes

Hi,
I read that many people use these 2 expressions indifferently although I know there is a difference between them.

How would you define a backing bean, as opposed to a managed bean ?

Thanks.

[att1.html]

Jim Driscoll

Hi -

I'm not sure I understood your question.

It sounds like you have a working program, right? With a separate nav
file? So... what's the problem you are encountering?

Jim

P.S. Out of curiosity, why not just use implicit navigation?

On 1/14/10 11:29 PM, webtier@javadesktop.org wrote:
> Hey there!!
>
> I'm new on the board and also new on JSF 2.0.
>
> I'm using Netbeans 6.8 and try to write a little webapplication using
> EJBs and JSF 2.0.
>
> I'd like to separate Navigation-rules from the faces-config.xml.
>
> so I write a:
> faces-config.xml containing application-Section placed in /WEB-INF and
> a navigation.faces-config.xml placed in /META-INF.
>
> As described in: Proposed Final Draft from JavaServer™ Faces
> Specification in section 11.4.2.
> ...
> * Search for all resources that match either
> “META-INF/faces-config.xml” or the end with “.faces-config.xml”
> directly in the “META-INF” directory. Each resource that matches that
> expression must be considered an application configuration resource.
> ...
>
> this should work or I wrong?
>
> When I add javax.faces.CONFIG-FILES context parameter with
> /META-INF/navigation.faces.config.xml every thing is ok.
>
> Did I misunderstood something?
>
> Thanks
> Harry
> [Message sent by forum member 'hpollak' (harald.pollak@docpilot.org)]
>
> http://forums.java.net/jive/thread.jspa?messageID=381105
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Imre Osswald

Hi,

I think Harry wants to know where to put ".faces-config.xml" so they
get loaded by faces, without specifying them in web.xml.
i tried with NB 6.8: created a folder in "Source Packages" called
"META-INF", added a File "navigation.faces-config.xml" and it worked.

But I see that you wrote
> When I add javax.faces.CONFIG-FILES context parameter with
> /META-INF/navigation.faces.config.xml every thing is ok.

this might be a typo in the mail only, but if you really named the
file navigation.faces.config.xml instead of faces-config ( '.' instead
of '-') it will not work automatically, which would explain why you
had to add it to web.xml to make it work.

Hope this helps, Imre

On 15.01.2010, at 19:17, Jim Driscoll wrote:

> Hi -
>
> I'm not sure I understood your question.
>
> It sounds like you have a working program, right? With a separate
> nav file? So... what's the problem you are encountering?
>
> Jim
>
> P.S. Out of curiosity, why not just use implicit navigation?
>
> On 1/14/10 11:29 PM, webtier@javadesktop.org wrote:
>> Hey there!!
>>
>> I'm new on the board and also new on JSF 2.0.
>>
>> I'm using Netbeans 6.8 and try to write a little webapplication
>> using
>> EJBs and JSF 2.0.
>>
>> I'd like to separate Navigation-rules from the faces-config.xml.
>>
>> so I write a:
>> faces-config.xml containing application-Section placed in /WEB-INF
>> and
>> a navigation.faces-config.xml placed in /META-INF.
>>
>> As described in: Proposed Final Draft from JavaServer™ Faces
>> Specification in section 11.4.2.
>> ...
>> * Search for all resources that match either
>> “META-INF/faces-config.xml” or the end with “.faces-config.xml”
>> directly in the “META-INF” directory. Each resource that matches
>> that
>> expression must be considered an application configuration resource.
>> ...
>>
>> this should work or I wrong?
>>
>> When I add javax.faces.CONFIG-FILES context parameter with
>> /META-INF/navigation.faces.config.xml every thing is ok.
>>
>> Did I misunderstood something?
>>
>> Thanks
>> Harry
>> [Message sent by forum member 'hpollak' (harald.pollak@docpilot.org)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=381105
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

hpollak
Offline
Joined: 2010-01-14

Hi!!!

I now tried to make the META-INF folder in Source Packages instate of Web Pages and then it works!
Thanks to Imre!!!! This was my problem!

best regards
Harry