| Author |
finding length of the bean value using JSTL
|
Naresh Talluri
Ranch Hand
Joined: Oct 12, 2007
Posts: 115
|
|
Hi folks Here iam facing a problem while finding the length of the particular bean value, here is the code snippet.... iam not able to do this can you please let me know how can i solve it.. is there any alternative to find the length of the bean value....! and one more thing iam getting the bean value like <code> <bean:write name="historyTable" property="comment"/> </code> how can i find the length of this bean value Thanks in advance  [ April 04, 2008: Message edited by: Naresh Talluri ]
|
 |
Pedro Erencia
Ranch Hand
Joined: Apr 03, 2008
Posts: 70
|
|
|
I think using an el-function just as you are doing is a pretty reasonable way to accomplish that, since you can't directly access length of a String in el. It should work if the tld and the taglib directive are correctly defined and bound.
|
 |
Naresh Talluri
Ranch Hand
Joined: Oct 12, 2007
Posts: 115
|
|
Here iam getting error like Validation error messages from TagLibraryValidator for c EL functions are not supported. and iam putting jars like jstl,standard.jar's inside lib folder...... i configured in web.xml also like ....... -Naresh [ April 04, 2008: Message edited by: Naresh Talluri ] [ April 04, 2008: Message edited by: Naresh Talluri ]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
Why are the TLD files there? Get rid of them and the web.xml entries. They are unnecessary and could get in the way. The TLD files exist in the jar files and the container will find them there. Have you followed the instructions in the JSP FAQ for setting up the JSTL properly?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Naresh Talluri
Ranch Hand
Joined: Oct 12, 2007
Posts: 115
|
|
I tried like that also, but i haven't get O/P i got the exception like... According to TLD or attribute directive in tag file, attribute test does not accept any expressions..
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
It sounds like your configuration is not correct. I ask again: have you followed the steps in the JSP FAQ to properly set up your web app to use the JSTL and EL? If not, you are wasting your own and everybody else's time.
|
 |
Naresh Talluri
Ranch Hand
Joined: Oct 12, 2007
Posts: 115
|
|
Hi Bear Iam following JSP faq, as you said but iam still getting the same problem which i had mentioned below.. here iam giving all the details... web.xml jstl jar Iam using jstl-1.2-sources.jar JSP In JSP the tag declaration is Can you please let me know the solution for this... --Naresh  [ April 05, 2008: Message edited by: Naresh Talluri ]
|
 |
Pedro Erencia
Ranch Hand
Joined: Apr 03, 2008
Posts: 70
|
|
|
You should use the binaries jstl-1.2.jar, not the sources jstl-1.2-sources.jar.
|
 |
Naresh Talluri
Ranch Hand
Joined: Oct 12, 2007
Posts: 115
|
|
Originally posted by Pedro Erencia: You should use the binaries jstl-1.2.jar, not the sources Pedro Erencia.
Hi Pedro Erencia can you please let me know what is the difference between jstl-1.2.jar and sources jstl-1.2.jar -Naresh
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
Why do you not open the jars and see for yourself?
|
 |
Naresh Talluri
Ranch Hand
Joined: Oct 12, 2007
Posts: 115
|
|
Hi this issue is resolved.. the thing is i used <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> instead of <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> Thanks for all your impeccable ideas, thoughts. --Naresh
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
For those wondering what the difference is, the former is a JSTL 1.1 URI, while the latter is the correct JSTL 1.2 URI.
|
 |
 |
|
|
subject: finding length of the bean value using JSTL
|
|
|