You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Shi, Jackie" <Ja...@FMR.COM> on 2005/08/01 21:33:50 UTC

RE: Datagrid scrollbar position on refresh

Thanks, Nestor,

I am not sure I follow your suggestion. How would I get the DIV object?

Jackie



-----Original Message-----
From: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve] 
Sent: Thursday, July 28, 2005 9:19 PM
To: 'Tag Libraries Users List'
Subject: RE: Datagrid scrollbar position on refresh


Hi Jackie

Looks like you will have to get the DIV object generated by the datagrid
tag. Then you will need to get the x and y position values of the DIV object
so you can pass it to the refreshed page so it will set the x and y
position. I hope this helps.

Regards,

Néstor Boscán 

-----Mensaje original-----
De: Shi, Jackie [mailto:Jackie.Shi@FMR.COM] 
Enviado el: Thursday, July 28, 2005 7:37 PM
Para: taglibs-user@jakarta.apache.org
Asunto: Datagrid scrollbar position on refresh

Hi, 

I recently implemented the datagrid taglib on my jsp page. I set a vertical
scrollbar on  my grid for user to scroll when the table has more than
certain rows. I refresh the page every 60 seconds using <meta> tag, for
example <meta http-equiv="Refresh" content="60" url="someUrl"
/>

When I scroll to the bottom of the grid, I'd like the scrollbar to stay at
the same position when the page is auto refreshed. But whenever the page is
refreshed, the scrollbar goes back to top. Does anyone know if there is a
way to "remember" the scrollbar position when page is refreshed?

Thanks in advance

Jackie Shi




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Chandramohan Mani <ch...@gmail.com>.
use <c:out value="${myList.size()}"/>
 I think size() will return the size of your list.
 -rgds
chandru

 On 8/2/05, Marius Botha <ma...@workpool.co.za> wrote: 
> 
> Hi there,
> 
> Just a basic question. I am trying to print out the size() of a List, like
> the tag below.
> 
> <c:out value="${myList.size}"/>
> 
> But I am getting the following error: "An error occurred while evaluating
> custom action attribute "value" with value "${myList.size}": The "."
> operator was supplied with an index value of type "java.lang.String" to be
> applied to a List or array, but that value cannot be converted to an
> integer. (null)"
> 
> Can the c:out tag not print int's or is it that I am calling "size()" 
> which
> does not have a getter/setter method? Please help.
> 
> Thanks,
> 
> Marius
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 


-- 
Chandramohan Mani
vMoksha Technologies.,
chandramohan@vmoksha.com
+91 (80) 25053500 ext 364

"Many of life's failure are people 
who did not realize how close
they were to success when they 
gave up" - Thomas Edison

RE: Datagrid scrollbar position on refresh

Posted by Néstor Boscán <ne...@tcs.com.ve>.
Hi Jackie

In javascript you can get and change HTML elements like a DOM tree. For
example you can get an object using its id with obj =
document.getElementById (id) and you can get all the objects of a specific
element using obj = obj.getElementsByTag ('div'). Then you can use
obj.scrollTop and obj.scrollLeft to get and set the scrollbar x and y
position.

Regards,

Néstor Boscán

-----Mensaje original-----
De: Shi, Jackie [mailto:Jackie.Shi@FMR.COM] 
Enviado el: Monday, August 01, 2005 3:34 PM
Para: Tag Libraries Users List
Asunto: RE: Datagrid scrollbar position on refresh

Thanks, Nestor,

I am not sure I follow your suggestion. How would I get the DIV object?

Jackie



-----Original Message-----
From: Néstor Boscán [mailto:nestor.boscan@tcs.com.ve]
Sent: Thursday, July 28, 2005 9:19 PM
To: 'Tag Libraries Users List'
Subject: RE: Datagrid scrollbar position on refresh


Hi Jackie

Looks like you will have to get the DIV object generated by the datagrid
tag. Then you will need to get the x and y position values of the DIV object
so you can pass it to the refreshed page so it will set the x and y
position. I hope this helps.

Regards,

Néstor Boscán 

-----Mensaje original-----
De: Shi, Jackie [mailto:Jackie.Shi@FMR.COM] 
Enviado el: Thursday, July 28, 2005 7:37 PM
Para: taglibs-user@jakarta.apache.org
Asunto: Datagrid scrollbar position on refresh

Hi, 

I recently implemented the datagrid taglib on my jsp page. I set a vertical
scrollbar on  my grid for user to scroll when the table has more than
certain rows. I refresh the page every 60 seconds using <meta> tag, for
example <meta http-equiv="Refresh" content="60" url="someUrl"
/>

When I scroll to the bottom of the grid, I'd like the scrollbar to stay at
the same position when the page is auto refreshed. But whenever the page is
refreshed, the scrollbar goes back to top. Does anyone know if there is a
way to "remember" the scrollbar position when page is refreshed?

Thanks in advance

Jackie Shi




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: How to print an "int" with a c:out tag?

Posted by Marius Botha <ma...@workpool.co.za>.
Thanks, I'll try that.

Cheers,

Marius

-----Original Message-----
From: Christian Taylor [mailto:christian.taylor@acadiau.ca]
Sent: 02 August 2005 01:08
To: Tag Libraries Users List
Subject: Re: How to print an "int" with a c:out tag?


Hi Marius,

Check out the fn:length() function, this is what you are looking for.
size() is a method and you cannot call methods directly from JSTL (only
getters and setters), but the fn taglib provides a function for length
of Collections and strings. See the JSTL 1.1 documentation for more
information, but basically fn:length() is what you are looking for:

<c:out value="${fn:length(myList)}"/>

Hope this helps.

 -Christian

Marius Botha wrote:

>Hi there,
>
>Just a basic question. I am trying to print out the size() of a List, like
>the tag below.
>
><c:out value="${myList.size}"/>
>
>But I am getting the following error: "An error occurred while evaluating
>custom action attribute "value" with value "${myList.size}": The "."
>operator was supplied with an index value of type "java.lang.String" to be
>applied to a List or array, but that value cannot be converted to an
>integer. (null)"
>
>Can the c:out tag not print int's or is it that I am calling "size()" which
>does not have a getter/setter method? Please help.
>
>Thanks,
>
>Marius
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Murray Steele <mu...@peoplesarchive.com>.
As far as I can tell the <taglib-location> for the fn taglib should  
probably be: /WEB-INF/fn.tld

If fn.tld isn't in the WEB-INF of your webapp you should probably do a  
search on your filesystem for the file and copy it into your WEB-INF.   
It should be present *somewhere* on your system, most likely in the  
place you originally obtained c.tld (and the other JSTL tld files)  
from.

The taglib-uri in your web.xml and the uri in your <%@ taglib %>  
statements have to match up and can be an ything you want (it's just a  
unique specifier), I think sun just recommend using their  
http://java.sun.com/jsp/jstl/functions urls, so that someone coming to  
your jsps later can look at your <%@ taglib %> statements and  
immediately realise "Ah, he's using the jstl functions" rather than  
some fn.tld that you have written yourself.  (I might have this wrong  
tho' I'm still mainly a jsp 1.2 person)

Muz

On 3 Aug 2005, at 10:52, Marius Botha wrote:

> 2. Included FN taglib in my web.xml file as I do with the other ones I  
> use:
>   <taglib>
>     <taglib-uri>/tags/fn</taglib-uri>
>
> <taglib-location>http://java.sun.com/jsp/jstl/functions</taglib- 
> location>
>   </taglib>
>   <taglib>
>     <taglib-uri>/tags/jstl-core</taglib-uri>
>     <taglib-location>/WEB-INF/c.tld</taglib-location>
>   </taglib>
>
>
--
Murray Steele
Senior Developer

Peoples Archive
w: http://www.peoplesarchive.com
t: 0207 323 0323
d: 0207 631 9147

This email has been scanned by Postini.
For more information please visit http://www.postini.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Response in Firefox vs IE

Posted by Martin Cooper <mf...@gmail.com>.
On 8/5/05, Marius Botha <ma...@workpool.co.za> wrote:
> Ok, seeing as no one wants to answer my "Tips for improving performance and
> optimizing tags" question, let me try something else :)
> 
> I have a JSP containing some tags that I developed. It displays quite a lot
> of content (couple of hundred rows of data, about 160KB of text). I have
> timed the various stages of the response and it takes about 2 sec to get all
> the info from the database, then about 2 sec to go through the tags, build
> the HTML, etc. But from the moment this is done and the last line of the JSP
> has executed it still takes a couple of seconds to display in the browser.
> In Firefox at least I get a couple of lines immediately once the page has
> finished executing, but in IE it takes another 5 seconds after everything
> has completed before I see any data.
> 
> Is there maybe a way one can flush data to the browser earlier on, or is
> this an IE problem? Putting flush in the JSP also makes no difference, this
> time lapse happens after the page has finished executing. It looks like it
> is buffering the response and only writing it out once it has received all
> the data.
> 
> Hope that makes sense and someone can give some constructive advice.

The first thing that strikes me is how amazingly slow each of these
steps is for just a couple of hundred rows! That suggests either slow
hardware or lots of opportunity to speed things up. ;-)

I won't try to help you optimise your database query - at least not on
this list - but that has to be possible too, unless it's horribly
complicated. Going from the result set to rendered HTML should be fast
too, unless you're doing a lot of computation along the way, but you
don't say what's involved there, so it's hard to tell what would
improve it. Finally, the browser rendering performance depends a great
deal on how you've structured your HTML, which again you haven't
actually told us about.

So basically, we're going to need more details to be of any help. ;-)

--
Martin Cooper


> Kind regards,
> 
> Marius Botha
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Response in Firefox vs IE

Posted by David Schwartz <ds...@arrayone.com>.
Is the data being displayed in a <table>?
If yes, the browser will render the entire table in memory before displaying it.

Quoting Marius Botha <ma...@workpool.co.za>:

>> Ok, seeing as no one wants to answer my "Tips for improving performance and
>> optimizing tags" question, let me try something else :)
>>
>> I have a JSP containing some tags that I developed. It displays quite a lot
>> of content (couple of hundred rows of data, about 160KB of text). I have
>> timed the various stages of the response and it takes about 2 sec to get all
>> the info from the database, then about 2 sec to go through the tags, build
>> the HTML, etc. But from the moment this is done and the last line of the JSP
>> has executed it still takes a couple of seconds to display in the browser.
>> In Firefox at least I get a couple of lines immediately once the page has
>> finished executing, but in IE it takes another 5 seconds after everything
>> has completed before I see any data.
>>
>> Is there maybe a way one can flush data to the browser earlier on, or is
>> this an IE problem? Putting flush in the JSP also makes no difference, this
>> time lapse happens after the page has finished executing. It looks like it
>> is buffering the response and only writing it out once it has received all
>> the data.
>>
>> Hope that makes sense and someone can give some constructive advice.
>>
>> Kind regards,
>>
>> Marius Botha
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>>


David Schwartz
Array Software Inc.
http://www.arrayone.com

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Response in Firefox vs IE

Posted by Marius Botha <ma...@workpool.co.za>.
Ok, seeing as no one wants to answer my "Tips for improving performance and
optimizing tags" question, let me try something else :)

I have a JSP containing some tags that I developed. It displays quite a lot
of content (couple of hundred rows of data, about 160KB of text). I have
timed the various stages of the response and it takes about 2 sec to get all
the info from the database, then about 2 sec to go through the tags, build
the HTML, etc. But from the moment this is done and the last line of the JSP
has executed it still takes a couple of seconds to display in the browser.
In Firefox at least I get a couple of lines immediately once the page has
finished executing, but in IE it takes another 5 seconds after everything
has completed before I see any data.

Is there maybe a way one can flush data to the browser earlier on, or is
this an IE problem? Putting flush in the JSP also makes no difference, this
time lapse happens after the page has finished executing. It looks like it
is buffering the response and only writing it out once it has received all
the data.

Hope that makes sense and someone can give some constructive advice.

Kind regards,

Marius Botha


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Tips for improving performance and optimizing tags

Posted by Marius Botha <ma...@workpool.co.za>.
Does anyone have any tips, ideas or things to watch out for when writing
"good" tags (or can suggest a good website/book) that will assist in
increasing performance.

I developed a data table tag (very much like the displaytag) where the users
can:
1. Sort data
2. Configure columns they want to see, or not see
3. Order the columns in the data table.

This tag is used to replace a previous servlet which just printed the data
rows and sorted them (no other configuration). But it is much slower due to
the amount of data it now builds up before it writes it to the screen.

Is there anything you guys can suggest, like using StringBuffer instead of
String to build up text written to pageContext.getOut(), etc. It gets quite
bad when I have e.g. 2000 rows I need to display (you can go make coffee and
come back) where the old one took 10secs... :(

Thanks,

Marius


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: How to print an "int" with a c:out tag?

Posted by Marius Botha <ma...@workpool.co.za>.
Thanks guys,

I tried that and got a new error (below). I will probably just go the
scriptlet route for now as maybe I have an old or incorrect JAR somewhere.
Can any one tell me where the TagLib for FN is?

What I did:
1. Changed <web-app ...> as per example.
2. Included FN taglib in my web.xml file as I do with the other ones I use:
  <taglib>
    <taglib-uri>/tags/fn</taglib-uri>

<taglib-location>http://java.sun.com/jsp/jstl/functions</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/tags/jstl-core</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
  </taglib>

Then I get "File "http://java.sun.com/jsp/jstl/functions" not found",
OR,
If I don't import the taglib in my web.xml file and just try to use it, I
get:
"The attribute prefix fn does not correspond to any imported tag library"

Thanks again for you patience, you've been a great help and I've learned
quite a bit.

Thanks,

Marius

-----Original Message-----
From: Christian Taylor [mailto:christian.taylor@acadiau.ca]
Sent: 02 August 2005 07:59
To: Tag Libraries Users List
Subject: Re: How to print an "int" with a c:out tag?


My next guess was going to be one thing mentioned on the page Murray
links to below. Regardless of whether you are using Tomcat 5, JSTL 1.1
and JSP 2.0... if your web.xml doesn't say it's a servlet 2.4 app it
will revert to Servlet 2.3/JSP 1.2 (and trying to use JSTL 1.1 with JSP
1.2 probably introduces many other problems...). As the page says, make
sure your <webapp> element starts like this:

<web-app 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
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

Otherwise the container will assume the servlet 2.3 spec and EL will not
be allowed outside of JSTL (1.0) tags. The fn:length() function I
originally mentioned is part of JSTL 1.1 anyway so it sounds like you
just need to make sure everything is configured for the current specs
and you should be good. Hope that will fix it up for you.

 -Christian

Murray Steele wrote:

> Perhaps this page might provide the solution?
>
> http://www.oreillynet.com/cs/user/view/cs_msg/32931
>
> Wrong taglib uri's or wrong webapp specification in your web.xml.
>
> Muz


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Christian Taylor <ch...@acadiau.ca>.
My next guess was going to be one thing mentioned on the page Murray
links to below. Regardless of whether you are using Tomcat 5, JSTL 1.1
and JSP 2.0... if your web.xml doesn't say it's a servlet 2.4 app it
will revert to Servlet 2.3/JSP 1.2 (and trying to use JSTL 1.1 with JSP
1.2 probably introduces many other problems...). As the page says, make
sure your <webapp> element starts like this:

<web-app 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
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

Otherwise the container will assume the servlet 2.3 spec and EL will not
be allowed outside of JSTL (1.0) tags. The fn:length() function I
originally mentioned is part of JSTL 1.1 anyway so it sounds like you
just need to make sure everything is configured for the current specs
and you should be good. Hope that will fix it up for you.

 -Christian

Murray Steele wrote:

> Perhaps this page might provide the solution?
>
> http://www.oreillynet.com/cs/user/view/cs_msg/32931
>
> Wrong taglib uri's or wrong webapp specification in your web.xml.
>
> Muz
>
> On 2 Aug 2005, at 14:32, Marius Botha wrote:
>
> > You know your stuff hey :)
> >
> > I believe I do use Tomcat 5 (running inside JBoss 3.2) and as a result 
> > have
> > their JSTL (looks like 1.1) and JSP-2.0.jar. Where do I find or can I 
> > check
> > if I have the TLD for the functions library (so I can include it if
> > missing)? At the moment I am including the TLD's in my WAR project and
> > specify them in the web.xml file.
> >
> > Thanks again.
> >
> > Marius
> >
> > -----Original Message-----
> > From: Murray Steele [mailto:murray@peoplesarchive.com]
> > Sent: 02 August 2005 02:31
> > To: Tag Libraries Users List
> > Subject: Re: How to print an "int" with a c:out tag?
> >
> >
> > I suspect that you are using either Tomcat 4.1.x and / or Standard 1.0x
> > for your JSTL.  EL functions are part of the JSTL 1.1 spec (JSP 2.0)
> > and aren't supported on Tomcat 4.1.x or Standard 1.0x (JSP 1.2 and JSTL
> > 1.0 respectively).  If you want to use the fn:length you need to use
> > JSTL 1.1 and hence Standard 1.1 and / or Tomcat 5.x.  (I think those
> > versions are correct, someone correct me if I'm wrong).
> >
> > If you cant change the version of Tomcat / JSTL you use:
> > 1. You could alter your myController.getOpenActivitiesForResource
> > method to return a class that extends list to provide a getSize() (and
> > hence your original <c:out value="${myList.size}"/> would work.
> > 2. Find some other Tag lib that lets you output list sizes.
> > (unstandard from the sandbox does this)
> > 3. Just use a scriptlet <%= ((MyControllerClass)
> > pageContext.findAttribute("myController")).getOpenActivitiesForResource
> > (
> > ).size() %>.
> >
> > Muz
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> >
> >
> --
> Murray Steele
> Senior Developer
>
> Peoples Archive
> w: http://www.peoplesarchive.com
> t: 0207 323 0323
> d: 0207 631 9147
>
> This email has been scanned by Postini.
> For more information please visit http://www.postini.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Murray Steele <mu...@peoplesarchive.com>.
Perhaps this page might provide the solution?

http://www.oreillynet.com/cs/user/view/cs_msg/32931

Wrong taglib uri's or wrong webapp specification in your web.xml.

Muz

On 2 Aug 2005, at 14:32, Marius Botha wrote:

> You know your stuff hey :)
>
> I believe I do use Tomcat 5 (running inside JBoss 3.2) and as a result  
> have
> their JSTL (looks like 1.1) and JSP-2.0.jar. Where do I find or can I  
> check
> if I have the TLD for the functions library (so I can include it if
> missing)? At the moment I am including the TLD's in my WAR project and
> specify them in the web.xml file.
>
> Thanks again.
>
> Marius
>
> -----Original Message-----
> From: Murray Steele [mailto:murray@peoplesarchive.com]
> Sent: 02 August 2005 02:31
> To: Tag Libraries Users List
> Subject: Re: How to print an "int" with a c:out tag?
>
>
> I suspect that you are using either Tomcat 4.1.x and / or Standard 1.0x
> for your JSTL.  EL functions are part of the JSTL 1.1 spec (JSP 2.0)
> and aren't supported on Tomcat 4.1.x or Standard 1.0x (JSP 1.2 and JSTL
> 1.0 respectively).  If you want to use the fn:length you need to use
> JSTL 1.1 and hence Standard 1.1 and / or Tomcat 5.x.  (I think those
> versions are correct, someone correct me if I'm wrong).
>
> If you cant change the version of Tomcat / JSTL you use:
> 1. You could alter your myController.getOpenActivitiesForResource
> method to return a class that extends list to provide a getSize() (and
> hence your original <c:out value="${myList.size}"/> would work.
> 2. Find some other Tag lib that lets you output list sizes.
> (unstandard from the sandbox does this)
> 3. Just use a scriptlet <%= ((MyControllerClass)
> pageContext.findAttribute("myController")).getOpenActivitiesForResource 
> (
> ).size() %>.
>
> Muz
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
--
Murray Steele
Senior Developer

Peoples Archive
w: http://www.peoplesarchive.com
t: 0207 323 0323
d: 0207 631 9147

This email has been scanned by Postini.
For more information please visit http://www.postini.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: How to print an "int" with a c:out tag?

Posted by Marius Botha <ma...@workpool.co.za>.
You know your stuff hey :)

I believe I do use Tomcat 5 (running inside JBoss 3.2) and as a result have
their JSTL (looks like 1.1) and JSP-2.0.jar. Where do I find or can I check
if I have the TLD for the functions library (so I can include it if
missing)? At the moment I am including the TLD's in my WAR project and
specify them in the web.xml file.

Thanks again.

Marius

-----Original Message-----
From: Murray Steele [mailto:murray@peoplesarchive.com]
Sent: 02 August 2005 02:31
To: Tag Libraries Users List
Subject: Re: How to print an "int" with a c:out tag?


I suspect that you are using either Tomcat 4.1.x and / or Standard 1.0x
for your JSTL.  EL functions are part of the JSTL 1.1 spec (JSP 2.0)
and aren't supported on Tomcat 4.1.x or Standard 1.0x (JSP 1.2 and JSTL
1.0 respectively).  If you want to use the fn:length you need to use
JSTL 1.1 and hence Standard 1.1 and / or Tomcat 5.x.  (I think those
versions are correct, someone correct me if I'm wrong).

If you cant change the version of Tomcat / JSTL you use:
1. You could alter your myController.getOpenActivitiesForResource
method to return a class that extends list to provide a getSize() (and
hence your original <c:out value="${myList.size}"/> would work.
2. Find some other Tag lib that lets you output list sizes.
(unstandard from the sandbox does this)
3. Just use a scriptlet <%= ((MyControllerClass)
pageContext.findAttribute("myController")).getOpenActivitiesForResource(
).size() %>.

Muz


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Murray Steele <mu...@peoplesarchive.com>.
I suspect that you are using either Tomcat 4.1.x and / or Standard 1.0x  
for your JSTL.  EL functions are part of the JSTL 1.1 spec (JSP 2.0)  
and aren't supported on Tomcat 4.1.x or Standard 1.0x (JSP 1.2 and JSTL  
1.0 respectively).  If you want to use the fn:length you need to use  
JSTL 1.1 and hence Standard 1.1 and / or Tomcat 5.x.  (I think those  
versions are correct, someone correct me if I'm wrong).

If you cant change the version of Tomcat / JSTL you use:
1. You could alter your myController.getOpenActivitiesForResource  
method to return a class that extends list to provide a getSize() (and  
hence your original <c:out value="${myList.size}"/> would work.
2. Find some other Tag lib that lets you output list sizes.   
(unstandard from the sandbox does this)
3. Just use a scriptlet <%= ((MyControllerClass)  
pageContext.findAttribute("myController")).getOpenActivitiesForResource( 
).size() %>.

Muz

On 2 Aug 2005, at 13:06, Marius Botha wrote:

> Ok, I feel like an idiot... I tried it with and without the nested ${}  
> as
> you guys suggested and am still getting the same EL expressions not
> supported error. I am including the "c.tld" tag library. Should I  
> maybe be
> using "c-rt.tld" instead, or what can it be?
>
> Thanks for your effort. Error below.
>
> Marius
>
>
> org.apache.jasper.JasperException: Validation error messages from
> TagLibraryValidator for c38: tag = 'out' / attribute = 'value': An  
> error
> occurred while parsing custom action attribute "value" with value
> "${fn:length(activityCtrl.openActivitiesForResource)}":
> org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL  
> functions
> are not supported.
>
>
> -----Original Message-----
> From: Christian Taylor [mailto:christian.taylor@acadiau.ca]
> Sent: 02 August 2005 01:38
> To: Tag Libraries Users List
> Subject: Re: How to print an "int" with a c:out tag?
>
>
> You're using too many ${} combinations :)  You only need them once to
> signal an expression. Try this:
>
> <c:out value="${fn:length(myController.activitiesForResource)}"/>
>
> You only need to use ${ ... } for the entire expression; it is not
> necessary to use this syntax again inside the expression.
>
>  -Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
--
Murray Steele
Senior Developer

Peoples Archive
w: http://www.peoplesarchive.com
t: 0207 323 0323
d: 0207 631 9147

This email has been scanned by Postini.
For more information please visit http://www.postini.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: how do you Show data from sql query result using datagrid taglib

Posted by Ferindo Middleton Jr <fm...@verizon.net>.
I keep getting this error message saying:

org.apache.jasper.JasperException: /web/registration_and_attendance_record_maintenance/find_and_list_registration.jsp(177,13) According to TLD or attribute directive in tag file, attribute items does not accept any expressions

I'm calling the tag like this (this is what line 177 in this JSP has):

<datagrid-ui:dataGrid items="${result.rows}" var="row" name="datagrid1" cellPadding="0" cellSpacing="0">

I start in this page by calling the sql query like this:

<sql:query dataSource="${utrad_db_data}" var="registrationList" 
scope="session">
SELECT *, registration_and_attendance.id AS registrationId FROM classes, 
bureaus, registration_and_attendance WHERE 
registration_and_attendance.id LIKE ? AND class_id LIKE ?
AND bureau_id LIKE ?
AND firstname LIKE ?
...
...

Why do I get this error message. It appears that      
items="${result.rows}"     is not proving the kind of data the tag is 
expecting...

Ferindo

Néstor Boscán wrote:

>Hi Ferindo
>
>It depends on what you are using to query the database. 
>
>For example if you're using the sql:query tag from the JSTL library you just
>set the query result in the "items" attribute like this:
>items="${result.rows}". 
>
>If you're using JDBC directly you need to store each row in a java bean or a
>map object. You put your objects in a Collection and then pass the
>Collection in the "items" attribute.
>
>Hope this helps
>
>Regards,
>
>Néstor Boscán
>
>-----Mensaje original-----
>De: Ferindo Middleton Jr [mailto:fmiddleton@verizon.net] 
>Enviado el: Tuesday, August 02, 2005 9:28 PM
>Para: Tag Libraries Users List
>Asunto: how do you Show data from sql query result using datagrid taglib
>
>I have installed the datagrid 1.2 taglib and have read the documentation and
>looked at the examples but none of these two sources specifically show how
>to use the datagrid taglib for showing the results of a database query.
>Can anyone give an example of how to tie the datagrid into showing database
>query/result records. I've been doing this the manual way using simple
>tables and looping through query results to regular html tables fields to
>populate the results of my sql queries for my application... 
>using datagrid seems like a cleaner tool...
>Also, this taglib seems to be just for viewing data but not editing it...
>any one one if setting up the fields for editing is possible with this
>taglib or if it is in the works wit h the developers or whether there is
>another taglib  out there  that's better for this  at any rate.
>
>Ferindo
>
>--
>Ferindo Middleton
>Chief Architect
>Sleekcollar.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
>  
>

-- 
Ferindo Middleton
Chief Architect
Sleekcollar.com



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: how do you Show data from sql query result using datagrid taglib

Posted by Ferindo Middleton Jr <fm...@verizon.net>.
I keep getting this error message saying:

org.apache.jasper.JasperException:
/web/registration_and_attendance_record_maintenance/find_and_list_registration.jsp(177,13)
According to TLD or attribute directive in tag file, attribute items
does not accept any expressions

I'm calling the tag like this (this is what line 177 in this JSP has):

<datagrid-ui:dataGrid items="${result.rows}" var="row" name="datagrid1" cellPadding="0" cellSpacing="0">

I start in this page by calling the sql query like this:

<sql:query dataSource="${utrad_db_data}" var="registrationList" 
scope="session">

SELECT *, registration_and_attendance.id AS registrationId FROM classes, 
bureaus, registration_and_attendance WHERE 
registration_and_attendance.id LIKE ? AND class_id LIKE ?
AND bureau_id LIKE ?
AND firstname LIKE ?
...
...

Why do I get this error message. It appears that      
items="${result.rows}"     is not providing the kind of data the tag is 
expecting...


Ferindo


Néstor Boscán wrote:

>Hi Ferindo
>
>It depends on what you are using to query the database. 
>
>For example if you're using the sql:query tag from the JSTL library you just
>set the query result in the "items" attribute like this:
>items="${result.rows}". 
>
>If you're using JDBC directly you need to store each row in a java bean or a
>map object. You put your objects in a Collection and then pass the
>Collection in the "items" attribute.
>
>Hope this helps
>
>Regards,
>
>Néstor Boscán
>
>-----Mensaje original-----
>De: Ferindo Middleton Jr [mailto:fmiddleton@verizon.net] 
>Enviado el: Tuesday, August 02, 2005 9:28 PM
>Para: Tag Libraries Users List
>Asunto: how do you Show data from sql query result using datagrid taglib
>
>I have installed the datagrid 1.2 taglib and have read the documentation and
>looked at the examples but none of these two sources specifically show how
>to use the datagrid taglib for showing the results of a database query.
>Can anyone give an example of how to tie the datagrid into showing database
>query/result records. I've been doing this the manual way using simple
>tables and looping through query results to regular html tables fields to
>populate the results of my sql queries for my application... 
>using datagrid seems like a cleaner tool...
>Also, this taglib seems to be just for viewing data but not editing it...
>any one one if setting up the fields for editing is possible with this
>taglib or if it is in the works wit h the developers or whether there is
>another taglib  out there  that's better for this  at any rate.
>
>Ferindo
>
>--
>Ferindo Middleton
>Chief Architect
>Sleekcollar.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
>
>
>  
>

-- 
Ferindo Middleton
Chief Architect
Sleekcollar.com



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: how do you Show data from sql query result using datagrid taglib

Posted by Néstor Boscán <ne...@tcs.com.ve>.
Hi Ferindo

It depends on what you are using to query the database. 

For example if you're using the sql:query tag from the JSTL library you just
set the query result in the "items" attribute like this:
items="${result.rows}". 

If you're using JDBC directly you need to store each row in a java bean or a
map object. You put your objects in a Collection and then pass the
Collection in the "items" attribute.

Hope this helps

Regards,

Néstor Boscán

-----Mensaje original-----
De: Ferindo Middleton Jr [mailto:fmiddleton@verizon.net] 
Enviado el: Tuesday, August 02, 2005 9:28 PM
Para: Tag Libraries Users List
Asunto: how do you Show data from sql query result using datagrid taglib

I have installed the datagrid 1.2 taglib and have read the documentation and
looked at the examples but none of these two sources specifically show how
to use the datagrid taglib for showing the results of a database query.
Can anyone give an example of how to tie the datagrid into showing database
query/result records. I've been doing this the manual way using simple
tables and looping through query results to regular html tables fields to
populate the results of my sql queries for my application... 
using datagrid seems like a cleaner tool...
Also, this taglib seems to be just for viewing data but not editing it...
any one one if setting up the fields for editing is possible with this
taglib or if it is in the works wit h the developers or whether there is
another taglib  out there  that's better for this  at any rate.

Ferindo

--
Ferindo Middleton
Chief Architect
Sleekcollar.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


how do you Show data from sql query result using datagrid taglib

Posted by Ferindo Middleton Jr <fm...@verizon.net>.
I have installed the datagrid 1.2 taglib and have read the documentation 
and looked at the examples but none of these two sources specifically 
show how to use the datagrid taglib for showing the results of a 
database query.
Can anyone give an example of how to tie the datagrid into showing 
database query/result records. I've been doing this the manual way using 
simple tables and looping through query results to regular html tables 
fields to populate the results of my sql queries for my application... 
using datagrid seems like a cleaner tool...
Also, this taglib seems to be just for viewing data but not editing 
it... any one one if setting up the fields for editing is possible with 
this taglib or if it is in the works wit h the developers or whether 
there is another taglib  out there  that's better for this  at any rate.

Ferindo

-- 
Ferindo Middleton
Chief Architect
Sleekcollar.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: How to print an "int" with a c:out tag?

Posted by Ranendra <rn...@camo.com>.
I reckon, u should use c_rt.tld instead of c.tld.....

-----Original Message-----
From: Marius Botha [mailto:marius@workpool.co.za] 
Sent: Tuesday, August 02, 2005 5:37 PM
To: 'Tag Libraries Users List'
Subject: RE: How to print an "int" with a c:out tag?

Ok, I feel like an idiot... I tried it with and without the nested ${} as
you guys suggested and am still getting the same EL expressions not
supported error. I am including the "c.tld" tag library. Should I maybe be
using "c-rt.tld" instead, or what can it be?

Thanks for your effort. Error below.

Marius


org.apache.jasper.JasperException: Validation error messages from
TagLibraryValidator for c38: tag = 'out' / attribute = 'value': An error
occurred while parsing custom action attribute "value" with value
"${fn:length(activityCtrl.openActivitiesForResource)}":
org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions
are not supported.


-----Original Message-----
From: Christian Taylor [mailto:christian.taylor@acadiau.ca]
Sent: 02 August 2005 01:38
To: Tag Libraries Users List
Subject: Re: How to print an "int" with a c:out tag?


You're using too many ${} combinations :)  You only need them once to
signal an expression. Try this:

<c:out value="${fn:length(myController.activitiesForResource)}"/>

You only need to use ${ ... } for the entire expression; it is not
necessary to use this syntax again inside the expression.

 -Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: How to print an "int" with a c:out tag?

Posted by Marius Botha <ma...@workpool.co.za>.
Ok, I feel like an idiot... I tried it with and without the nested ${} as
you guys suggested and am still getting the same EL expressions not
supported error. I am including the "c.tld" tag library. Should I maybe be
using "c-rt.tld" instead, or what can it be?

Thanks for your effort. Error below.

Marius


org.apache.jasper.JasperException: Validation error messages from
TagLibraryValidator for c38: tag = 'out' / attribute = 'value': An error
occurred while parsing custom action attribute "value" with value
"${fn:length(activityCtrl.openActivitiesForResource)}":
org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions
are not supported.


-----Original Message-----
From: Christian Taylor [mailto:christian.taylor@acadiau.ca]
Sent: 02 August 2005 01:38
To: Tag Libraries Users List
Subject: Re: How to print an "int" with a c:out tag?


You're using too many ${} combinations :)  You only need them once to
signal an expression. Try this:

<c:out value="${fn:length(myController.activitiesForResource)}"/>

You only need to use ${ ... } for the entire expression; it is not
necessary to use this syntax again inside the expression.

 -Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Christian Taylor <ch...@acadiau.ca>.
You're using too many ${} combinations :)  You only need them once to
signal an expression. Try this:

<c:out value="${fn:length(myController.activitiesForResource)}"/>

You only need to use ${ ... } for the entire expression; it is not
necessary to use this syntax again inside the expression.

 -Christian

Marius Botha wrote:

>My requirement is really a bit different. I have an expression, which
>returns a List, the size of which I would like to display. I.e. I have
>${myController.activitiesForResource}, which returns a list.
>
>If I try <c:out
>value="${fn:length(${myController.activitiesForResource})}"/> I get an error
>saying "EL expressions are not supported". Any ideas?
>
>Thanks,
>
>Marius
>
>-----Original Message-----
>From: Christian Taylor [mailto:christian.taylor@acadiau.ca]
>Sent: 02 August 2005 01:08
>To: Tag Libraries Users List
>Subject: Re: How to print an "int" with a c:out tag?
>
>
>Hi Marius,
>
>Check out the fn:length() function, this is what you are looking for.
>size() is a method and you cannot call methods directly from JSTL (only
>getters and setters), but the fn taglib provides a function for length
>of Collections and strings. See the JSTL 1.1 documentation for more
>information, but basically fn:length() is what you are looking for:
>
><c:out value="${fn:length(myList)}"/>
>
>Hope this helps.
>
> -Christian
>
>Marius Botha wrote:
>
>  
>
>>Hi there,
>>
>>Just a basic question. I am trying to print out the size() of a List, like
>>the tag below.
>>
>><c:out value="${myList.size}"/>
>>
>>But I am getting the following error: "An error occurred while evaluating
>>custom action attribute "value" with value "${myList.size}": The "."
>>operator was supplied with an index value of type "java.lang.String" to be
>>applied to a List or array, but that value cannot be converted to an
>>integer. (null)"
>>
>>Can the c:out tag not print int's or is it that I am calling "size()" which
>>does not have a getter/setter method? Please help.
>>
>>Thanks,
>>
>>Marius
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Murray Steele <mu...@peoplesarchive.com>.
You probably don't need the nested ${}.  Try <c:out 
value="${fn:length(myController.activitiesForResource)}"/> instead.

Muz


On 2 Aug 2005, at 12:34, Marius Botha wrote:

> If I try <c:out
> value="${fn:length(${myController.activitiesForResource})}"/> I get an 
> error
> saying "EL expressions are not supported". Any ideas?
--
Murray Steele
Senior Developer

Peoples Archive
w: http://www.peoplesarchive.com
t: 0207 323 0323
d: 0207 631 9147

This email has been scanned by Postini.
For more information please visit http://www.postini.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: How to print an "int" with a c:out tag?

Posted by Marius Botha <ma...@workpool.co.za>.
My requirement is really a bit different. I have an expression, which
returns a List, the size of which I would like to display. I.e. I have
${myController.activitiesForResource}, which returns a list.

If I try <c:out
value="${fn:length(${myController.activitiesForResource})}"/> I get an error
saying "EL expressions are not supported". Any ideas?

Thanks,

Marius

-----Original Message-----
From: Christian Taylor [mailto:christian.taylor@acadiau.ca]
Sent: 02 August 2005 01:08
To: Tag Libraries Users List
Subject: Re: How to print an "int" with a c:out tag?


Hi Marius,

Check out the fn:length() function, this is what you are looking for.
size() is a method and you cannot call methods directly from JSTL (only
getters and setters), but the fn taglib provides a function for length
of Collections and strings. See the JSTL 1.1 documentation for more
information, but basically fn:length() is what you are looking for:

<c:out value="${fn:length(myList)}"/>

Hope this helps.

 -Christian

Marius Botha wrote:

>Hi there,
>
>Just a basic question. I am trying to print out the size() of a List, like
>the tag below.
>
><c:out value="${myList.size}"/>
>
>But I am getting the following error: "An error occurred while evaluating
>custom action attribute "value" with value "${myList.size}": The "."
>operator was supplied with an index value of type "java.lang.String" to be
>applied to a List or array, but that value cannot be converted to an
>integer. (null)"
>
>Can the c:out tag not print int's or is it that I am calling "size()" which
>does not have a getter/setter method? Please help.
>
>Thanks,
>
>Marius
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: How to print an "int" with a c:out tag?

Posted by Christian Taylor <ch...@acadiau.ca>.
Hi Marius,

Check out the fn:length() function, this is what you are looking for.
size() is a method and you cannot call methods directly from JSTL (only
getters and setters), but the fn taglib provides a function for length
of Collections and strings. See the JSTL 1.1 documentation for more
information, but basically fn:length() is what you are looking for:

<c:out value="${fn:length(myList)}"/>

Hope this helps.

 -Christian

Marius Botha wrote:

>Hi there,
>
>Just a basic question. I am trying to print out the size() of a List, like
>the tag below.
>
><c:out value="${myList.size}"/>
>
>But I am getting the following error: "An error occurred while evaluating
>custom action attribute "value" with value "${myList.size}": The "."
>operator was supplied with an index value of type "java.lang.String" to be
>applied to a List or array, but that value cannot be converted to an
>integer. (null)"
>
>Can the c:out tag not print int's or is it that I am calling "size()" which
>does not have a getter/setter method? Please help.
>
>Thanks,
>
>Marius
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


How to print an "int" with a c:out tag?

Posted by Marius Botha <ma...@workpool.co.za>.
Hi there,

Just a basic question. I am trying to print out the size() of a List, like
the tag below.

<c:out value="${myList.size}"/>

But I am getting the following error: "An error occurred while evaluating
custom action attribute "value" with value "${myList.size}": The "."
operator was supplied with an index value of type "java.lang.String" to be
applied to a List or array, but that value cannot be converted to an
integer. (null)"

Can the c:out tag not print int's or is it that I am calling "size()" which
does not have a getter/setter method? Please help.

Thanks,

Marius