• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL:PGJP and Struts?

 
Charles Hasegawa
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Sue Spielman!
Does this book discuss using JSTL and Struts taglibs at all (even as a comparison), or is this book strictly JSTL?
Also, is there any discussion about how a programmer will be able to use EL in JSP 2.0 as compared to current implementation.
 
Sue Spielman
Author
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Charles. This book is strictly JSTL so that all of the actions could be covered in detail. You will learn the EL so that it can also be used in JSP 2.0.
Sue
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any difference between the current EL and the EL proposed in JSP 2.0
 
Charles Hasegawa
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct me if I'm wrong, but in JSP 2.x, EL will be part of the spec, so you should be able to use it anywhere (not just in the JSTL taglibs). You should be able to eliminate <%= someVar.getFoo() %> scriptlets by using EL.
Does anyone know, does this mean you'd be able to use an EL expression anywhere (ie taglibs that don't currently accept dynamic values)?
 
norman richards
Author
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is that you will be able to use EL only in rtexpr taglibs. So, if you can write:
<mytag value="<%= foo.getName() %>" />
or
<mytag value="<c ut value="${foo.name}" />" />
Then you'll be able to write:
<mytag value="${foo.name}" />

Of course, EL usage everywhere else should be ok...
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to eliminate <%= someVar.getFoo() %> scriptlets by using EL.
\
You are right.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess currently only the JSTL tag understand the EL but in future the JSP container will.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Roth: For many applications, embedding Java code (scriptlets) in your JSP pages can make your pages more difficult to read and maintain (among other problems). Let's take a simple example:
<% Map m = (Map)pageContext.getAttribute("state");
State s = ((State)m.get( "NY" ));
if( s != null ) {%><% }
%>
The JSP Standard Tag Library (JSTL) introduced a language called SPEL (the Simplest Possible Expression Language) to help make writing JSP pages simpler. For example, the above example can be rewritten as follows:
${state["NY"].capitol}
This is obviously much easier to read. In the JSP 2.0 release, by popular demand, we've integrated the EL so it can now be used directly in your template text, and inside attributes of all tag libraries!
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following is the JavaLive discussion between Moderator(Edward Ort) and Marty Hall and Mark Roth...
Mark Roth: For many applications, embedding Java code (scriptlets) in your JSP pages can make your pages more difficult to read and maintain (among other problems). Let's take a simple example:
<% Map m = (Map)pageContext.getAttribute("state");
State s = ((State)m.get( "NY" ));
if( s != null ) {%><% }
%>
The JSP Standard Tag Library (JSTL) introduced a language called SPEL (the Simplest Possible Expression Language) to help make writing JSP pages simpler. For example, the above example can be rewritten as follows:
${state["NY"].capitol}
This is obviously much easier to read. In the JSP 2.0 release, by popular demand, we've integrated the EL so it can now be used directly in your template text, and inside attributes of all tag libraries!


By seeing the bold letter, Mark Roth confirms that EL will surely be integrated in the JSP 2.0... For more information, u can surf to the following link...
http://developer.java.sun.com/developer/community/chat/JavaLive/2003/jl0311.html
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry for mis-clicking on the "Add Reply" button before finishing the editing my message... which makes two messages submitted to the forum...
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the JSP 2.0 release, by popular demand, we've integrated the EL so it can now be used directly in your template text, and inside attributes of all tag libraries!

when will JSP 2.0 be out?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:

when will JSP 2.0 be out?

We cannot know when JSP 2.0 will exactly be out... However u can download J2EE 1.4 SDK Beta 2 release and test JSP 2.0 on it...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic