Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » JSF with Eclipse - Tutorial
JSF with Eclipse - Tutorial [message #476061] Thu, 13 November 2008 00:05 Go to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi,

I created a small JSF with Eclipse WTP JSF Tutorial. Feedback welcome.

Link: http://www.vogella.de/articles/JavaServerFaces/article.html

Best regards, Lars
-
Re: JSF with Eclipse - Tutorial [message #476062 is a reply to message #476061] Thu, 13 November 2008 12:47 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi Lars,

good tutorial!

Some minor things:

1.5 Value and Method Binding:
"Tip: Expression Language statements either start with "${" or "#{" and end with
"}" " => could you explain the difference beetween "$" and "#" (I know that
there is one, but I don't know it myself ;-) )

3.3. Download the JSTL library
"If you know where I find the standard JSTL1.2 reference implementation please
email this information to me." => there is no separate download, it seems to be
part of the JavaEE5 RI (http://java.sun.com/javaee/downloads/index.jsp). I found
it also as part of JBoss 5.

4.4. Create Java Server Page
Image and code snippet seem to be swapped (correct: first image, then code)

5.4. Validators
I miss the implementation of the "validate" (with check for login="tester").

5.5. Resource bundle for messages -> typo in file name: "message.properites"

Best regards

Wolfgang
Re: JSF with Eclipse - Tutorial [message #476063 is a reply to message #476062] Thu, 13 November 2008 21:18 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Wolfgang,

thank you for the feedback.

To 1.5 I believe the following is true (I added it also to the article):
JSP EL expressions are using the ${...} syntax. These EL expressions are
immediately evaluated. JSF EL expressions are of the type #{...}. These
are only evaluated when needed (and otherwisestored as strings).

To 3.3. Shame, I really would like to have a separate download for this.
I'm neither using JBoss nor do I want to download glassfish just for
these libs. So I hope for a better and brighter future and leave this
comment in the article... ;-)

4.4 Fixed

5.4. Fixed

5.5 Fixed

Best regards, Lars


Wolfgang Knauf wrote:
> Hi Lars,
>
> good tutorial!
>
> Some minor things:
>
> 1.5 Value and Method Binding:
> "Tip: Expression Language statements either start with "${" or "#{" and
> end with "}" " => could you explain the difference beetween "$" and "#"
> (I know that there is one, but I don't know it myself ;-) )
>
> 3.3. Download the JSTL library
> "If you know where I find the standard JSTL1.2 reference implementation
> please email this information to me." => there is no separate download,
> it seems to be part of the JavaEE5 RI
> (http://java.sun.com/javaee/downloads/index.jsp). I found it also as
> part of JBoss 5.
>
> 4.4. Create Java Server Page
> Image and code snippet seem to be swapped (correct: first image, then code)
>
> 5.4. Validators
> I miss the implementation of the "validate" (with check for
> login="tester").
>
> 5.5. Resource bundle for messages -> typo in file name:
> "message.properites"
>
> Best regards
>
> Wolfgang


--
Lars Vogel
http://www.vogella.de/eclipse.html - Tutorials about Eclipse
http://www.vogella.de/articles/RichClientPlatform/article.ht ml - Eclipse
RCP Tutorial
Re: JSF with Eclipse - Tutorial [message #476064 is a reply to message #476063] Fri, 14 November 2008 12:02 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi Larx,

>
> To 1.5 I believe the following is true (I added it also to the article):
> JSP EL expressions are using the ${...} syntax. These EL expressions are
> immediately evaluated. JSF EL expressions are of the type #{...}. These
> are only evaluated when needed (and otherwisestored as strings).

I found this article about the "Unified EL":
http://java.sun.com/products/jsp/reference/techart/unifiedEL .html
If I find the time to read it, it will hopefully remove the fog in my brain ;-).
There seems to be more about it than just deferred evaluation.


> To 3.3. Shame, I really would like to have a separate download for this.
> I'm neither using JBoss nor do I want to download glassfish just for
> these libs. So I hope for a better and brighter future and leave this
> comment in the article... ;-)
>

Here is a direct download link:
https://javaserverfaces.dev.java.net/servlets/ProjectDocumen tList?folderID=5220&expandFolder=5220&folderID=8467

Best regards

Wolfgang
Re: JSF with Eclipse - Tutorial [message #476065 is a reply to message #476064] Fri, 14 November 2008 19:25 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Wolfgang Knauf wrote:
> Hi Larx,
>
>>
>> To 1.5 I believe the following is true (I added it also to the
>> article): JSP EL expressions are using the ${...} syntax. These EL
>> expressions are immediately evaluated. JSF EL expressions are of the
>> type #{...}. These are only evaluated when needed (and otherwisestored
>> as strings).
>
> I found this article about the "Unified EL":
> http://java.sun.com/products/jsp/reference/techart/unifiedEL .html
> If I find the time to read it, it will hopefully remove the fog in my
> brain ;-). There seems to be more about it than just deferred evaluation.
>
Thanks. I'll include this in the references of the articles.
>
>> To 3.3. Shame, I really would like to have a separate download for
>> this. I'm neither using JBoss nor do I want to download glassfish just
>> for these libs. So I hope for a better and brighter future and leave
>> this comment in the article... ;-)
>>
>
> Here is a direct download link:
> https://javaserverfaces.dev.java.net/servlets/ProjectDocumen tList?folderID=5220&expandFolder=5220&folderID=8467
>
Thanks.
>
> Best regards
>
> Wolfgang
>


--
Lars Vogel
http://www.vogella.de/eclipse.html - Tutorials about Eclipse
http://www.vogella.de/articles/RichClientPlatform/article.ht ml - Eclipse
RCP Tutorial
Re: JSF with Eclipse - Tutorial [message #476066 is a reply to message #476061] Fri, 14 November 2008 22:15 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> Link: http://www.vogella.de/articles/JavaServerFaces/article.html

This looks really good! One thing you will be interested to know is that
starting in Galileo, the current JSF library concept is going to be
replaced by a pure classpath container concept. This solve some
outstanding bugs like ones related to broken source attachments.

I'll see if we can link this from the JSF tools project page. It is
definitely more up to date than the current tutorial.


--Cam
Re: JSF with Eclipse - Tutorial [message #476108 is a reply to message #476064] Fri, 14 November 2008 22:23 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> I found this article about the "Unified EL":
> http://java.sun.com/products/jsp/reference/techart/unifiedEL .html
> If I find the time to read it, it will hopefully remove the fog in my
> There seems to be more about it than just deferred evaluation.

In JSP 2.0 and before the main difference is, as you say, early vs.
late-bound compilation. ${} is resolved when the JSP page is compiled
into Java. #{} is not resolved until the compiled Java for a JSP is
executed.

So the expression: bean.foo

When it's in ${bean.foo}, the variable 'bean' must be defined when the JSP
page is compiled. You can think of this as similar to variables in Java.

When it's in #{bean.foo}, the variable bean need not be defined until
runtime. That's why it is used in JSF, since JSF injects things into the
runtime that JSP doesn't know about at compile time, like managed beans.

In JSP 2.1 (Faces 1.2), Unified EL created a separate standard for EL. In
the new standard, the meaning of $ vs. # is left to the implementer.
However, I believe in the JSP context the meaning is the same. On the
other hand, in something like Facelets all EL is "late-bound" regardless
of $ or #.


--Cam
Re: JSF with Eclipse - Tutorial [message #476109 is a reply to message #476066] Fri, 14 November 2008 22:41 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Cameron Bateman wrote:
>> Link: http://www.vogella.de/articles/JavaServerFaces/article.html
>
> This looks really good!

Thank you.

One thing you will be interested to know is
> that starting in Galileo, the current JSF library concept is going to be
> replaced by a pure classpath container concept. This solve some
> outstanding bugs like ones related to broken source attachments.

Very good: I saw today the announcement:
detailshttp://www.eclipse.org/webtools/development/news/3.1M 3/
>
> I'll see if we can link this from the JSF tools project page. It is
> definitely more up to date than the current tutorial.
>
>
> --Cam
>

Thank you. Thank would be very nice.
Re: JSF with Eclipse - Tutorial [message #618731 is a reply to message #476061] Thu, 13 November 2008 12:47 Go to previous message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi Lars,

good tutorial!

Some minor things:

1.5 Value and Method Binding:
"Tip: Expression Language statements either start with "${" or "#{" and end with
"}" " => could you explain the difference beetween "$" and "#" (I know that
there is one, but I don't know it myself ;-) )

3.3. Download the JSTL library
"If you know where I find the standard JSTL1.2 reference implementation please
email this information to me." => there is no separate download, it seems to be
part of the JavaEE5 RI (http://java.sun.com/javaee/downloads/index.jsp). I found
it also as part of JBoss 5.

4.4. Create Java Server Page
Image and code snippet seem to be swapped (correct: first image, then code)

5.4. Validators
I miss the implementation of the "validate" (with check for login="tester").

5.5. Resource bundle for messages -> typo in file name: "message.properites"

Best regards

Wolfgang
Re: JSF with Eclipse - Tutorial [message #618732 is a reply to message #476062] Thu, 13 November 2008 21:18 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi Wolfgang,

thank you for the feedback.

To 1.5 I believe the following is true (I added it also to the article):
JSP EL expressions are using the ${...} syntax. These EL expressions are
immediately evaluated. JSF EL expressions are of the type #{...}. These
are only evaluated when needed (and otherwisestored as strings).

To 3.3. Shame, I really would like to have a separate download for this.
I'm neither using JBoss nor do I want to download glassfish just for
these libs. So I hope for a better and brighter future and leave this
comment in the article... ;-)

4.4 Fixed

5.4. Fixed

5.5 Fixed

Best regards, Lars


Wolfgang Knauf wrote:
> Hi Lars,
>
> good tutorial!
>
> Some minor things:
>
> 1.5 Value and Method Binding:
> "Tip: Expression Language statements either start with "${" or "#{" and
> end with "}" " => could you explain the difference beetween "$" and "#"
> (I know that there is one, but I don't know it myself ;-) )
>
> 3.3. Download the JSTL library
> "If you know where I find the standard JSTL1.2 reference implementation
> please email this information to me." => there is no separate download,
> it seems to be part of the JavaEE5 RI
> (http://java.sun.com/javaee/downloads/index.jsp). I found it also as
> part of JBoss 5.
>
> 4.4. Create Java Server Page
> Image and code snippet seem to be swapped (correct: first image, then code)
>
> 5.4. Validators
> I miss the implementation of the "validate" (with check for
> login="tester").
>
> 5.5. Resource bundle for messages -> typo in file name:
> "message.properites"
>
> Best regards
>
> Wolfgang


--
Lars Vogel
http://www.vogella.de/eclipse.html - Tutorials about Eclipse
http://www.vogella.de/articles/RichClientPlatform/article.ht ml - Eclipse
RCP Tutorial
Re: JSF with Eclipse - Tutorial [message #618733 is a reply to message #476063] Fri, 14 November 2008 12:02 Go to previous message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi Larx,

>
> To 1.5 I believe the following is true (I added it also to the article):
> JSP EL expressions are using the ${...} syntax. These EL expressions are
> immediately evaluated. JSF EL expressions are of the type #{...}. These
> are only evaluated when needed (and otherwisestored as strings).

I found this article about the "Unified EL":
http://java.sun.com/products/jsp/reference/techart/unifiedEL .html
If I find the time to read it, it will hopefully remove the fog in my brain ;-).
There seems to be more about it than just deferred evaluation.


> To 3.3. Shame, I really would like to have a separate download for this.
> I'm neither using JBoss nor do I want to download glassfish just for
> these libs. So I hope for a better and brighter future and leave this
> comment in the article... ;-)
>

Here is a direct download link:
https://javaserverfaces.dev.java.net/servlets/ProjectDocumen tList?folderID=5220&expandFolder=5220&folderID=8467

Best regards

Wolfgang
Re: JSF with Eclipse - Tutorial [message #618734 is a reply to message #476064] Fri, 14 November 2008 19:25 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Wolfgang Knauf wrote:
> Hi Larx,
>
>>
>> To 1.5 I believe the following is true (I added it also to the
>> article): JSP EL expressions are using the ${...} syntax. These EL
>> expressions are immediately evaluated. JSF EL expressions are of the
>> type #{...}. These are only evaluated when needed (and otherwisestored
>> as strings).
>
> I found this article about the "Unified EL":
> http://java.sun.com/products/jsp/reference/techart/unifiedEL .html
> If I find the time to read it, it will hopefully remove the fog in my
> brain ;-). There seems to be more about it than just deferred evaluation.
>
Thanks. I'll include this in the references of the articles.
>
>> To 3.3. Shame, I really would like to have a separate download for
>> this. I'm neither using JBoss nor do I want to download glassfish just
>> for these libs. So I hope for a better and brighter future and leave
>> this comment in the article... ;-)
>>
>
> Here is a direct download link:
> https://javaserverfaces.dev.java.net/servlets/ProjectDocumen tList?folderID=5220&expandFolder=5220&folderID=8467
>
Thanks.
>
> Best regards
>
> Wolfgang
>


--
Lars Vogel
http://www.vogella.de/eclipse.html - Tutorials about Eclipse
http://www.vogella.de/articles/RichClientPlatform/article.ht ml - Eclipse
RCP Tutorial
Re: JSF with Eclipse - Tutorial [message #618735 is a reply to message #476061] Fri, 14 November 2008 22:15 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> Link: http://www.vogella.de/articles/JavaServerFaces/article.html

This looks really good! One thing you will be interested to know is that
starting in Galileo, the current JSF library concept is going to be
replaced by a pure classpath container concept. This solve some
outstanding bugs like ones related to broken source attachments.

I'll see if we can link this from the JSF tools project page. It is
definitely more up to date than the current tutorial.


--Cam
Re: JSF with Eclipse - Tutorial [message #618736 is a reply to message #476064] Fri, 14 November 2008 22:23 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> I found this article about the "Unified EL":
> http://java.sun.com/products/jsp/reference/techart/unifiedEL .html
> If I find the time to read it, it will hopefully remove the fog in my
> There seems to be more about it than just deferred evaluation.

In JSP 2.0 and before the main difference is, as you say, early vs.
late-bound compilation. ${} is resolved when the JSP page is compiled
into Java. #{} is not resolved until the compiled Java for a JSP is
executed.

So the expression: bean.foo

When it's in ${bean.foo}, the variable 'bean' must be defined when the JSP
page is compiled. You can think of this as similar to variables in Java.

When it's in #{bean.foo}, the variable bean need not be defined until
runtime. That's why it is used in JSF, since JSF injects things into the
runtime that JSP doesn't know about at compile time, like managed beans.

In JSP 2.1 (Faces 1.2), Unified EL created a separate standard for EL. In
the new standard, the meaning of $ vs. # is left to the implementer.
However, I believe in the JSP context the meaning is the same. On the
other hand, in something like Facelets all EL is "late-bound" regardless
of $ or #.


--Cam
Re: JSF with Eclipse - Tutorial [message #618737 is a reply to message #476066] Fri, 14 November 2008 22:41 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Cameron Bateman wrote:
>> Link: http://www.vogella.de/articles/JavaServerFaces/article.html
>
> This looks really good!

Thank you.

One thing you will be interested to know is
> that starting in Galileo, the current JSF library concept is going to be
> replaced by a pure classpath container concept. This solve some
> outstanding bugs like ones related to broken source attachments.

Very good: I saw today the announcement:
detailshttp://www.eclipse.org/webtools/development/news/3.1M 3/
>
> I'll see if we can link this from the JSF tools project page. It is
> definitely more up to date than the current tutorial.
>
>
> --Cam
>

Thank you. Thank would be very nice.
Previous Topic:JSF with Eclipse - Tutorial
Next Topic:Visual Editor
Goto Forum:
  


Current Time: Tue Apr 16 18:14:05 GMT 2024

Powered by FUDForum. Page generated in 0.36553 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top