RE: [ANN] JavaServer Pages, 3rd Edition (O'Reilly)
I would rather see both JSP2.0 and JSTL1.0 reference book in one - because it is most likely you would be using them together and that would spare you from having one more book on your bookshelf :) thanks, Marina -Original Message- From: Henri Yandell [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 2:51 PM To: Tag Libraries Users List Subject: Re: [ANN] JavaServer Pages, 3rd Edition (O'Reilly) I'd like to see a JSTL only pocket reference, but I'm not sure what the critical mass page-wise is for such a thing. Hen On Tue, 23 Dec 2003, Hans Bergsten wrote: Henri Yandell wrote: How about a JSTL pocket reference Hans? You're with the right publisher and it sounds like the book has the content in it to make it easy. Yes, that's an idea. I did a pocket reference for JSP 1.1 a couple of years ago (roughly 80 pocket-size pages). Would it make more sense to do separate JSP 2.0 and JSTL 1.1 pocket references, or one that combines JSP 2.0 and JSTL 1.1? I'll check with O'Reilly after the holidays. Hans On Tue, 23 Dec 2003, Hans Bergsten wrote: K.C. Baltz wrote: Does you book have a quick-reference/cheatsheet for JSTL? The one from Manning's book (appendix A) isn't really quick enough for me (Too many pages). I find I'd really like a 1-2 page summary of EL and the JSTL tags. I keep meaning to do one up myself, but of course work projects keep taking priority. I'm not sure what you'd like to see covered by a 1 - 2 page summary, but in terms of summaries, my book has 3 page overview of the JSP EL (with tables for all operators and implicit variables) in one chapter, a 3 page intro to JSTL in another chapter, plus appendixes with concice descriptions of all JSTL custom tags and classes and the JSP EL syntax, variables, and type conversion rules. The EL and JSTL tags are also used extensively in realistic examples throughout the book. Hans Hans Bergsten wrote: I'm proud to announce that the 3rd Edition of my JavaServer Pages book is now available at Amazon.com, BarnesAndNoble.com and other online stores, as well as in most regular book stores. The 3rd edition covers all the great new features added in JSP 2.0 and JSTL 1.1, such as tag files (custom tags as JSP pages), the Expression Language, the new, simplified tag handler API, XML syntax enhancements, new configuration options, and a lot more. For more information, a sample chapter and the updated examples, please visit the book web site: http://www.thejspbook.com/ Hans -- Hans Bergsten[EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com/ Author of O'Reilly's JavaServer Pages, covering JSP 2.0 and JSTL 1.1 Details athttp://TheJSPBook.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to maintain the selection items in the Select using the j akarta.apache.org input tag library
you could also try using TreeMap - it is ordered. You might also consider writing your own comparator for keys if you don't like the default one Marina -Original Message- From: Martin Cooper [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 7:10 PM To: Tag Libraries Users List Subject: Re: How to maintain the selection items in the Select using the jakarta.apache.org input tag library On Tue, 4 Nov 2003, Kimberly Clary wrote: I want to have the items in my Select list showing in a certain order. I've looked over both the html and jsp examples that were provided when I downloaded the tag lib but they only contain the basics. I enter the following in my jsp - td nowrap label for=bacBACbrCode:br(none or allbrreturns all)/labelbr /td td % java.util.HashMap b = new java.util.HashMap(); b.put(id, bac); b.put(multiple, null); b.put(size, 6); java.util.Hashtable bo = new java.util.Hashtable(); bo.put(CSP, 1); bo.put(FAP, 2); bo.put(FRU, 3); bo.put(OPT, 4); bo.put(PPN, 5); bo.put(Paper, 6); % input:select name=bac attributes=%= b % options=%= bo% / /td but the data doesn't display in this order. It's showing up in the order of - FAP OPT PPN Paper CSP FRU I think the code should be using the getKey method for building this selection list if we want to maintain the order. HashMaps and Hashtables are unordered collections. The order in which you add elements to them does not make any difference at all. If you need to preserve that order, you may want to take a look at the SequencedHashMap class in the Jakarta Commons Collections package. -- Martin Cooper Can someone help me? Thanks - Kim --- Kim Clary Global AMS Delivery Internet Design and Development Tie: 444-2396 Ph:919-254-2396 Life gets boring if you stay within the limits - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
EL expressions are not evaluated
Hi, Sorry if this question was asked already... I am trying to write a simple test web application using JSTL and encountered the following problem: JSTL core tags are working fine (like c:out ..., c:forEach...) but the EL expressions are not evaluated. I do use the c.tld file - it is in my app's WEB-INf directory. Below is a simple test page that demonstrates the problem: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html head titleJSTL WISS Preview/title /head body bgcolor=#FF jsp:useBean id=directory class=test_wiss_JSTL.WISSDirectoryDataBean / br Total number of Files (JSTL): c:out value=${directory.totalNumFiles}/ br Total number of Files (JSP): jsp:getProperty name=directory property=totalNumFiles/ br c:forEach var=i begin=1 end=5 c:out value=${i}/br /c:forEach c:forEach var=file items=${directory.fileList} c:out value=${file}/br /c:forEach /body /html The result (in the browser) is: Total number of Files (JSTL): ${directory.totalNumFiles} Total number of Files (JSP): 2 ${i} ${i} ${i} ${i} ${i} ${file} So, as you can see, the c:xxx tags work correctly , the usual JSP tags work correctly also and the bean's totalNumFiles value is shown correctly too, but when I try to show the same value using the EL expression (${directory.totalNumFiles} ) - it does not work. Nor does a simple integer value ${i} - not a bean's property... It seems I'm missing something very obvious - just cannot see it just yet. Any ideas? I use Tomcat5.0.12. I did try to include the JSTL's jar files (standard.jar and jstl.jar) into my web application's WEB-INF/lib directory, even though they are in the $CATALINA/commons/lib - it did not help. Thanks, Marina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL expressions are not evaluated
Thanks, Manos, it worked! Marina -Original Message- From: Manos Papantoniou [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 1:27 PM To: Tag Libraries Users List Subject: Re: EL expressions are not evaluated Try adding ?xml version=1.0 ? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd at the top of your web.xml. If you don't tell tomcat this is a 2.4 version document it will not try evaluating EL expressions. Also, don't double-include libs that are already in tomcat/common/lib in your WEB-INF/lib since it can cause problems. There is no need for it either. If you are using an IDE you might have to include just the path to those libraries in the project settings Manos - Original Message - From: Popova, Marina To: '[EMAIL PROTECTED]' Sent: Tuesday, October 21, 2003 6:22 PM Subject: EL expressions are not evaluated Hi, Sorry if this question was asked already... I am trying to write a simple test web application using JSTL and encountered the following problem: JSTL core tags are working fine (like c:out ..., c:forEach...) but the EL expressions are not evaluated. I do use the c.tld file - it is in my app's WEB-INf directory. Below is a simple test page that demonstrates the problem: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html head titleJSTL WISS Preview/title /head body bgcolor=#FF jsp:useBean id=directory class=test_wiss_JSTL.WISSDirectoryDataBean / br Total number of Files (JSTL): c:out value=${directory.totalNumFiles}/ br Total number of Files (JSP): jsp:getProperty name=directory property=totalNumFiles/ br c:forEach var=i begin=1 end=5 c:out value=${i}/br /c:forEach c:forEach var=file items=${directory.fileList} c:out value=${file}/br /c:forEach /body /html The result (in the browser) is: Total number of Files (JSTL): ${directory.totalNumFiles} Total number of Files (JSP): 2 ${i} ${i} ${i} ${i} ${i} ${file} So, as you can see, the c:xxx tags work correctly , the usual JSP tags work correctly also and the bean's totalNumFiles value is shown correctly too, but when I try to show the same value using the EL expression (${directory.totalNumFiles} ) - it does not work. Nor does a simple integer value ${i} - not a bean's property... It seems I'm missing something very obvious - just cannot see it just yet. Any ideas? I use Tomcat5.0.12. I did try to include the JSTL's jar files (standard.jar and jstl.jar) into my web application's WEB-INF/lib directory, even though they are in the $CATALINA/commons/lib - it did not help. Thanks, Marina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]