JSTL, retrieving total number of elements of a Vector

I have a class "Customer" which has a member "orders" which is a Vector. I have an instance of this class "Customer" stored as a session attribute named "customer". In a JSP, how do i <c:set a variable to the total number of elements of Vector "orders"?

If you have a JSP2.0 container (ie Tomcat 5) you should use JSTL1.1
With a JSP1.2 Container (eg Tomcat 4, and practically every other mainstream container) use JSTL1.0
The easiest way to tell which one you are using is to look at the URI for the taglib
Note that the taglib URIs changed between JSTL1.0 and JSTL1.1
1.0 = http://java.sun.com/jstl/core
1.1 = http://java.sun.com/jsp/jstl/core
Make sure you are using the right URI when importing the taglib.
Cheers,
evnafets

Similar Messages

  • Total number of elements in an array

    Hello, 
    I am trying to count the total number of elements in an array. 
    I have a simulate signal VI, that simulates a square pulse, this is being written into an excel file using the write to measurement VI, all for a given period of time. 
    I want to further chop a window of the signal depending on different paramenters (a trigger, which I intend to incorperate later, for now I am working of learning how to chop the data)
    In order to chop the data I need to know the array size, I use the array size funtion, I right click on the appeneded array in the front pannel and click show last element (array size -1) it doesnt match with the number of rows in the excel file written by the write to measurement VI, in fact it macthes with the "number of samples" I selected in the simulate signal VI. 
    Am I doing something wrong? 
    Why is there a miss match??
    I have attached my VI, Please help
    Thank You
    SP
    Attachments:
    FlashERGTrialVI 150218.vi ‏93 KB

    Hello RavensFan
    Thank you for the reply, I did incorperate the changes, but the same number is displayed in the indicator.  I've attahced my VI
    SP
    Attachments:
    FlashERGTrialVI 150218.vi ‏106 KB

  • How do I find the total number of elements in a multi dim array

    How do I find the total number of elements in a single or multi dim array?
    For example, a 2x3 array has 6 elements, and a 2x3x4 has 24. How do I compute this very easily - is there a single VI that does this?
    David
    Solved!
    Go to Solution.

    Use "array size" (array palette) followed by "multiply array elements" (numeric palette)
    (Works also equally well for 3D arrays and higher)
    For a 1D array, just use "array size".
    Message Edited by altenbach on 02-05-2009 05:57 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    NumberOfElements.png ‏3 KB

  • How to retrieve total number of pages in a report of Instance - RAS SDK ?

    Hello All,
    Hope all is well. I am using BOXI R2 Enterprise and was wondering how to get total # of pages of an Crystal Report Instance using RAS SDK.
    Thanks in advance,
    Sam

    How do i retrieve the total number of pages in a report-- via RAS SDK
    Sincerely,
    Ted Ueda

  • Number of Elements at this level --------------( 1 for Dimension Total)' ?

    Hi All,
    If we check the Dimension Hierarchy Property ..there is option like ‘Number of Elements at this level --------------( 1 for Dimension Total)’
    ‘Number of Elements at this level --------------( 1 for Dimension Total)’ ? in Dimension Hierarchy
    What is the use of it ?

    Number of Elements - What is it?

  • How to get Total Number of XML Nodes?

    Hello All,
    I have a Flash program I'm doing in Actionscript 3, using CS6.
    I'm using the XMLSocket Class to read-in XML Data. I will write some sample XML Data that is being sent to the Flash
    program below...
    I know with this line here (below) I can access the 4th "element or node" of that XML Data.
         Accessing XML Nodes/Elements:
    // *I created an XML Variable called xml, and "e.data" contains ALL the XML Data
    var xml:XML = XML(e.data);
    // Accessing the 4th element of the data:
    xml.MESSAGE[3].@VAR;          --->     "loggedOutUsers"
    xml.MESSAGE[3].@TEXT;         --->     "15"
         SAMPLE XML DATA:
         <FRAME>
    0               <MESSAGE VAR="screen2Display" TEXT="FRAME_1"/>
    1               <MESSAGE VAR="numUsers" TEXT="27"/>
    2               <MESSAGE VAR="loggedInUsers" TEXT="12"/>
    3               <MESSAGE VAR="loggedOutUsers" TEXT="15"/>
    4               <MESSAGE VAR="admins" TEXT="2"/>
         </FRAME>
    I'm new to Flash and Actionscript but I'm very familiar with other languages and how arrays work and such, and I know for
    example, in a Shell Script to get the total number of elements in an array called "myArray" I would write something like
    this --> ${#myArray[@]}. And since processing the XML Data looks an awful lot like an array I figured there was maybe
    some way of accessing the total number of "elements/nodes" in the XML Data...?
    Any thoughts would be much appreciated!
    Thanks in Advance,
    Matt

    Hey vamsibatu, thanks again for the quick reply!
    Ohhh, ok I gotcha. That makes more sense.
    So I just tried this loop below and I guess I could use this and just keep assigning an int variable to the output so
    when it finishes I will be left with a variable containing the total number of elements:
    for (var x:int in xml.MESSAGE)
         trace("x == " + x);
    *Which OUTPUTS the Following:
    x == 0
    x == 1
    x == 2
    x == 3
    x == 4
    So I guess I could do something like this and when the loop completes I will be left with the total number of elements/nodes...
    var myTotal:int;
    for (var x:int in xml.MESSAGE)
        myTotal = x;
    // add '1' to myTotal since the XML Data is zero-based:
    myTotal += 1;
    trace("myTotal == " + myTotal);
    *Which Prints:
    "myTotal == 5"
    Thanks again for you suggestions, much appreciated!
    I think that should be good enough for what I needed. Thanks...
    Thanks Again,
    Matt

  • Number of elements in target to host DMA FIFO

    Hi everyone,
    I'd like to transfer a set of datapoints from a FPGA to a RT-host controller using a DMA fifo. If I use the "Get Number of Elements to Write" function on the FPGA target, do I get the total number of elements in both buffers, or just the one on the FPGA-target?
    (see http://zone.ni.com/reference/en-XX/help/371599H-01​/lvfpgaconcepts/fpga_dma_how_it_works/)
    Solved!
    Go to Solution.

    What type of data do you want to transfer over the FIFO? As in how many bits does each sample contain.
    The reason I ask is because you can take a bit packing approach.
    Lets take for example you want to take two samples of a measerment both samples are 32 bit and then send the data as a set to the processor.
    If you just dump the data into a single FIFO you may lose track as to what was the rising edge, or falling edge data, or if the two samples you got from the FIFO are even from the same dataset.
    To fix this use bit packing technique.
    On the FPGA merge your two 32 bit data sets into one 64bit dataset. 
    Set your FIFO to 64 bits.
    On the processor side of things all you need to do is read one 64bit dataset from the FIFO.
    Use the split data to break the 64bit into two 32bit data fields. 
    Now you have your two data samples, and you can be garentee that it is from the same dataset.
    If the sum of the data bits exceed 64 bits (the limit of the FPGA FIFO) then you will need to migrate to a more complex bit packing data schema where the data is split up among multiple 64bit datafields, with a defined bitfield header and identifier. For example the first 5 bits of the 64bit data identifies that this data block is 1 out of X data blocks, that when combinded together and reasembeled per the schema will represent your data..
    I hope this helps.

  • Count total number of existing Portal users..Urgent

    Hello All,
    im working on EP6 SP9 (and SP12).
    I would appreciate if anyone would please guide me - How can I retrieve total number of existing Portal users (<b>using code</b> & not Activity Reporting).
    This is kinda urgent....please I request you all.
    Thanks in Advance.
    Warm Regards,
    Ritu R HUnjan

    Hi ritu,
    Check this code. This will give you the total no of users and the names of all the users:
    package com.hcl;
    import com.sap.security.api.ISearchResult;
    import com.sap.security.api.IUser;
    import com.sap.security.api.IUserFactory;
    import com.sap.security.api.IUserSearchFilter;
    import com.sap.security.api.UMFactory;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class PortalUsers extends AbstractPortalComponent
         public void doContent(
              IPortalComponentRequest request,
              IPortalComponentResponse response)
              try
                   IUserFactory userfactory = UMFactory.getUserFactory();
                   IUserSearchFilter userfltr = userfactory.getUserSearchFilter();
                   userfltr.setMaxSearchResultSize(5000);
                   ISearchResult userResult = userfactory.searchUsers(userfltr);
                   int size = userResult.size();
                   response.write("<table><tr><td bgcolor=Green>"+ "Names of the user are:"+ "</td></tr></table>n");
                   while (userResult.hasNext())
                        response.write("<table border=0>n");
                        String uniqueid = (String) userResult.next();
                        IUser user = userfactory.getUser(uniqueid);
                        response.write("<tr><td>"+ user.getDisplayName()+ "</td></tr>n");
                        response.write("</table>n");
                   response.write("<table border=0><tr><td bgcolor=Green>"+ " Total no of users "+ "</td></tr>n");
                   response.write("<tr><td bgcolor=Red>"+ size+ "</td></tr></table>n");
              catch (Exception e)
    I hope this solves your problem
    Regards
    Pravesh
    PS: Please reward points if answer is helpful.

  • Getting the total number of the parameters that are not null

    hi,
    i can get all the parameter names of a http request using this statement:
    Enumeration e=request.getParameterNames();if i want to know how many parameters there are in the request
    i just need to count the total number of elements in the enumeration
    but how can i get the total number of parameters which are not null?
    thanks in advance

    but how can i get the total number of parameters
    which are not null?Only one way that I know of... loop over the parameter names and check if they are null or not!!!!!!!!!!!!!!!!!!!!!
    xH4x0r

  • BPM: How to return the total number of lines in Multiline Container Element

    Hi all:
    I am trying to follow the following blog to do message splitting:
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    In the blog, total number of messages for Message1 was returned to Count in Message 2.
    If I do not want to create message 2, if there any way to return total number lines in multiline elements ? Because this number need to be used to specify in loop condition:
    While Indxe != TotalNumberOfLines
    Thanks
    Liang

    Hi, Matias:
    For the loop block option, your answer is passing message count in different message type is best option !
    I really do not know why SAP does not deliver a build-in function to return the number of items in multiline element at run time ?
    Now the question for the second option: ForEach block:
    When I leave current line of block properties empty, the compile does not pass
    I have to input a another element (Var_Cur) in current line
    Inside my block, I have one send step, it will send Var_Dest[Index],  followed by a container operation step to increment Index by 1.
    With above setup, I compile it, compile passed, but it says:
    "Container Element Var_Cur in Step Block1 is initialized but not used"
    then I added another containter operation step in block:
    Var_Cur = Var_Dest[Index]
    I modified send step to send Var_Cur rather than Var_Dest.
    Up to now, I can compile it without any warnings.
    But when I send message to IE, the message pass pipe line, but it seems does not pass the BPE.
    When I go to SXI_CACHE, to check the return code for my Integration process is 0, means no error.
    But my message does not reach my target system.
    Where do you think I made wrong ?
    Thanks
    Liang

  • How can I retrieve a lost serial number for Elements 11 which was not registered?

    I forgot to register my Elements 11 which I installed on Windows XP but now need to reinstal on Windows 7 but do not have the serial number. Is there a way to retrieve this number?

    If it was a download check your e-mail. If not you can try starting a Chat with Adobe at http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html#ac tivate-problem.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • How to get total number of result count for particular key on cluster

    Hi-
    My application requirement is client side require only limited number of data for 'Search Key' form total records found in cluster. Also i need 'total number of result count' for that key present on the custer.
    To get subset of record i'm using IndexAwarefilter and returning only limited set each individual node. though i get total number of records present on the individual node, it is not possible to return this count to client form IndexAwarefilter (filter return only Binary set).
    Is there anyway i can get this number (total result size) on client side without returning whole chunk of data?
    Thanks in advance.
    Prashant

    user11100190 wrote:
    Hi,
    Thanks for suggesting a soultion, it works well.
    But apart from the count (cardinality), the client also expects the actual results. In this case, it seems that the filter will be executed twice (once for counting, then once again for generating actual resultset)
    Actually, we need to perform the paging. In order to achieve paging in efficient manner we need that filter returns only the PAGESIZE records and it also returns the total 'count' that meets the criteria.
    If you want to do paging, you can use the LimitFilter class.
    If you want to have paging AND total number of results, then at the moment you have to use two passes if you want to use out-of-the-box features because LimitFilter does not return the total number of results (which by the way may change between two page retrieval).
    What we currently do is, the filter puts the total count in a static variable and but returns only the first N records. The aggregator then clubs these info into a single list and returns to the client. (The List returned by aggregator contains a special entry representing the count).
    This is not really a good idea because if you have more than one user doing this operation then you will have problems storing more than one values in a single static variable and you used a cache service with a thread-pool (thread-count set to larger than one).
    We assume that the aggregator will execute immediately after the filter on the same node, this way aggregator will always read the count set by the filter.
    You can't assume this if you have multiple client threads doing the same kind of filtering operation and you have a thread-pool configured for the cache service.
    Please tell us if our approach will always work, and whether it will be efficient as compared to using Count class which requires executing filter twice.
    No it won't if you used a thread-pool. Also, it might happen that Coherence will execute the filtering and the aggregation from the same client thread multiple times on the same node if some partitions were newly moved to the node which already executed the filtering+aggregation once. I don't know anything which would even prevent this being executed on a separate thread concurrently.
    The following solution may be working, but I can't fully recommend it as it may leak memory depending on how exactly the filtering and aggregation is implemented (if it is possible that a filtering pass is done but the corresponding aggregation is not executed on the node because of some partitions moved away).
    At sending the cache.aggregate(Filter, EntryAggregator) call you should specify a unique key for each such filtering operation to both the filter and the aggregator.
    On the storage node you should have a static HashMap.
    The filter should do the following two steps while being synchronized on the HashMap.
    1. Ensure that a ConcurrentLinkedQueue object exists in a HashMap keyed by that unique key, and
    2. Enqueue the total number count you want to pass to the aggregator into that queue.
    The parallel aggregator should do the following two steps while being synchronized on the HashMap.
    1. Dequeue a single element from the queue, and return it as a partial total count.
    2. If the queue is now empty, then remove it from the HashMap.
    The parallel aggregator should return the popped number as a partial total count as part of the partial result.
    The client side of the parallel aware aggregator should sum the total counts in the partial result.
    Since the enqueueing and dequeueing may be interleaved from multiple threads, it may be possible that the partial total count returned in a result does not correspond to the data in the partial result, so you should not base anything on that assumption.
    Once again, that approach may leak memory based on how Coherence is internally implemented, so I can't recommend this approach but it may work.
    Another thought is that since returning entire cached values from an aggregation is more expensive than filtering (you have to deserialize and reserialize objects), you may still be better off by running a separate count and filter pass from the client, since for that you may not need to deserialize entries at all, so the cost on the server may be lower.
    Best regards,
    Robert

  • How to get total number of licenses

    Hi everyone,
    Who knows how to get the total number of licenses, I am using SBO 2005 PL07+VB.Net. from SDK help file I saw there is a SAP Business One License API, but I cann't find this API from object browse, who knows which file contents the license API.
    Thanks in advance!
    Kathy

    Hi Kathy,
    Since (un-?)fortunately the license server has been moved from DCOM to CORBA, this information is currently obsolete (I still hope we will get this information through the SDK some time in future...).
    As an interim solution you will have to get this information from the B1LicenseFile.txt file through some small application you write (you could have e.g. a service that writes the information you are interested in into some table in some database - and retrieve this information through a SQL statement).
    HTH,
    Frank

  • How to get the number of elements in DB

    Could you tell me how to get the number of elements in DB??
    My code to get the number is below, but I think it is not efficient
    DB->cursor(DB, NULL, &cursorp, 0);
    while ((ret = cursorp->c_get(cursorp, &key, &data, DB_NEXT)) == 0)
    count++;
    --------------------------------------------------------------------------------------------------------------

    Hi,
    The most efficient way to get a count from the database is using the DB->stat API (http://docs.oracle.com/cd/E17076_02/html/api_reference/C/dbstat.html)
    The code will be something like:
            DB *dbp;
            DB_BTREE_STAT *statp;
            int ret;
            /* Print out the number of records in the database. */
            if ((ret = dbp->stat(dbp, NULL, &statp, 0)) != 0) {
                    dbp->err(dbp, ret, "DB->stat");
                    goto err1;
            printf("%s: database contains %lu records\n",
                progname, (u_long)statp->bt_ndata);
            free(statp);The code comes from the example included in the distribution at examples/c/ex_btrec.c
    If the database isn't a btree, you should update to the appropriate statistics structure and field.
    It's worth noting that retrieving the count is never a "cheap" operation. The count is not stored in the database - since doing so introduced a single point of contention that creates a bottle neck.
    Regards,
    Alex Gorrod
    Oracle Berkeley DB

  • How count the total number of instances ?

    I have 2 scenarios :-
    1. How to get the total number of instances of  the node  in a BO?
    eg :
    businessobject BO1   {
    element BO_ID;
                       node NODE1 [0..n]
                         element Node_ID;
                         element Status ;
                         element value:
    I want to get total number of the NODES instances in the particular instance of the BO1.   !!!?????
    2. I want to  make some calculations based on the attributes of the NODE1 , in the   BeforeSave .absl  of the Business Object BO1.
    eg:
    something like this :-
    In BeforeSave of BO1.absl -
    for ( all the instances in NODE1 )
    {   if (NODE1.status == true)
                 sum = sum + NODE1.value
    Please help !!!!

    Your approach is correct.
    You can use a standard Query or create your own Query to run through Datainstances.
    Documentation with examples for Queries in ABSL see here: https://my020062.sapbydesign.com/sap/ap/ui/repository/SAP_BYD_WEKTRA/CP/sapLSUIContentPlayerTestPage.html?manifest=067D03A7602B1D490899DF46B5082089&COMPONENT=A1S_PDI&RELEASE=260&LANGUAGE=en&REGION=&INDUSTRY=&TASK=CR_VIEW&sap-language=EN
    Looking / Clincking  for "SAP Business ByDesign Scripting Language" and "Syntax for Implementation of Actions and Events" and "Query"

Maybe you are looking for

  • Mac book display doesn't work anymore

    I normally use my mac book 2011 with an external display. However, for the past few days, the macbook display is not working. The computer boots up, but will only display on the external display with the lid closed. How do I fix this?

  • F1 Help content are displayed in english instead of the language logged in

    Dear all, The SAP version is ECC 6.0 unicode system. we have imported chinese language and we logged in to SAP using chinese as the logon language. when my end user press F1(perfromance assistant), the help contents are getting displayed in English.

  • Uploading pages to FTP - Get error of internal data error

    I had malware on my computer and had to redo the whole computer and reinstall Dreamweaver CS5. I have not had to redo this for 4 years and in the process ..none of my pages will upload with Dreamweaver as before. All I did was update my pictures like

  • Shift satetment problem

    hi i am not understanding the output of he last one why the out put is 'abcdefghi' SHIFT ALPHABET RIGHT DELETING TRAILING M2. t DATA: ALPHABET(15) VALUE '     ABCDEFGHIJ',       M1(4)        VALUE 'ABCD',       M2(6)        VALUE 'BJJCA '. SHIFT ALPH

  • AAM Install Location Preference Ignored... Again!

    I have a cloud subscription, so this refers to the AAM downloader/installer. Having had issues previously, I double checked that the preference location for where AAM is to install a new application was set. After over an hour of downloading, install