aspose file tools*
The moose likes JSP and the fly likes JSTL:PGJP and Struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL:PGJP and Struts?" Watch "JSTL:PGJP and Struts?" New topic
Author

JSTL:PGJP and Struts?

Charles Hasegawa
Ranch Hand

Joined: May 22, 2003
Posts: 117
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.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

http://www.amazon.com/exec/obidos/tg/detail/-/0126567557/102-8570661-6643308?v=glance#product-details


Groovy
Sue Spielman
Author
Ranch Hand

Joined: Apr 21, 2003
Posts: 56
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


President/Consulting Engineer<br />Switchback Software LLC<br /><a href="http://www.switchbacksoftware.com" target="_blank" rel="nofollow">www.switchbacksoftware.com</a>
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Is there any difference between the current EL and the EL proposed in JSP 2.0
Charles Hasegawa
Ranch Hand

Joined: May 22, 2003
Posts: 117
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

Joined: Jul 21, 2003
Posts: 367
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

Joined: Feb 27, 2002
Posts: 8919

You should be able to eliminate <%= someVar.getFoo() %> scriptlets by using EL.
\
You are right.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

I guess currently only the JSTL tag understand the EL but in future the JSP container will.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
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!


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
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

Joined: Jun 08, 2002
Posts: 3178
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

Joined: Feb 27, 2002
Posts: 8919

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

Joined: Jun 08, 2002
Posts: 3178
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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL:PGJP and Struts?