ArrayList indices (Phrase counter follow-up)

Hi everybody--
I finally figured out how to get code onto this computer I'm working with, so here's what I'm trying to do for anyone that doesn't remember. I'm using TuringPest's suggestion to go through my word list once, and then delete any index that fails on an expansion.
This is my original post:
I'm writing a phrase counter, and so far it's working, but I'm trying to optimize it because running over a for loop is really slowing me down.
Here's the problem:
I want to get phrases that repeat more than once, from length 3 words to 10 words. Each time I change the length of the phrase (say, from 10 to 9 to 8, etc down to 3), I have to run over the entire word list all over again, which eventually amounts to 8 total passes over an ArrayList that's almost 45000 elements long right now, and will get longer.
An added complication in this is that there are certain identifiers in the word list that mark the beginnings of chapters (#) and sentences ($); any time they are hit, the iterator moves to the next word.
So, basically, something like...
example example example example example $ # example example example $
...with the repeating loop I have now would give:
0 phrases of length 10, 9, 8, 7, or 6
1 of length 5
2 of length 4
4 of length 3
and this is the reply I'm trying to emulate:
Find the occurences of the smaller phrases first.
Index their locations.
Do all subsequent longer phrase matches only from the saved locations.
I wrote a self-contained test program, and the problem with it seems to be that the correct indices aren't being saved. The first iteration where we go through every possible index for phrases 3 words long works fine, but every subsequent one doesn't and I'm not sure why. Here's the code:
EDIT: Sorry about the bump but I just realized I might have left something out for clarity--the newIndexes list is being created each time to hold the places where phrases can still be built, and then replacing the old indexes list (at least, that's what it's supposed to do).
import java.util.ArrayList;
import java.util.TreeMap;
public class Test {
     public static void main(String[] args) {
          ArrayList<String> words = new ArrayList<String>();
                // Two different arrays to test with
          //String[] raw = {"#", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "$", "#", "eleven", "twelve", "thirteen", "fourteen", "$"};
          String[] raw = {"#", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "$"};
          for( int i = 0; i < raw.length; i++ ) {
               words.add( raw[i] );
          TreeMap<String, ArrayList<Integer>> phraseList = new TreeMap<String, ArrayList<Integer>>();
          ArrayList<Integer> indexes = new ArrayList<Integer>();
          int lengthOfPhrase = 3;
          for( int i = 0; i < words.size(); i++ ) {
               indexes.add( i );
          do {
               TreeMap<String, ArrayList<Integer>> phraseRaw = new TreeMap<String, ArrayList<Integer>>();
               ArrayList<Integer> newIndexes = new ArrayList<Integer>();
               int chapter = 0;
               for( int i = 0; i < indexes.size(); i++ ) {
                    String ready = words.get( indexes.get( i ) );
                    boolean okay = true;
                    if( ready.equalsIgnoreCase( "#" ) ) {
                         okay = false;
                    } else if( !ready.equalsIgnoreCase( "$" ) ) {
                         okay = true;
                         for( int j = 0; j < lengthOfPhrase; j++ ) {
                              if( j != 0 ) {
                                   ready = ready.concat( " " );
                                   String next = words.get( i + j );
                                   if( next.equalsIgnoreCase( "#" ) || next.equalsIgnoreCase( "$" ) ) {
                                        okay = false;
                                        break;
                                   } else {
                                        ready = ready.concat( next );
                         if( okay ) {
                              newIndexes.add( indexes.get( i ) );
                              if( phraseList.containsKey( ready ) ) {
                                   ArrayList<Integer> values = phraseList.get( ready );
                                   values.add( chapter );
                                   phraseList.put( ready, values );
                              } else {
                                   if( phraseRaw.containsKey( ready ) ) {
                                        ArrayList<Integer> values = phraseRaw.get( ready );
                                        values.add( chapter );
                                        phraseList.put( ready, values );
                                   } else {
                                        ArrayList<Integer> newValues = new ArrayList<Integer>();
                                        newValues.add( chapter );
                                        phraseRaw.put( ready, newValues );
               lengthOfPhrase++;
               indexes.clear();
               indexes = newIndexes;
          } while( lengthOfPhrase <= 10 );
}Does anyone see where I'm going wrong?
Thanks,
Jezzica85
Message was edited by:
jezzica85

OK, I guess I'll try again to explain what's going on and try to be more clear.
Inside the map, there is a list of phrases, ranging from 3 to 20 words in length. For those phrases that appear in the document more than once (that is, the length of their arrayList value is 2 or more), I need to know if they are contained within any other phrase keys in the map.
So, if part of the map was like this:
This is an example=[2,4,6]
This is an=[2,4,6]
is another example of this=[1,3,5]
is another example=[1,3,5]
The revised map after the substrings were taken out would be:
This is an example=[2,4,6]
is another example of this=[1,3,5]
The second entry of the original map would be taken out because it was contained by and occurred in the same positions as the first, and the fourth entry of the original map would be taken out because it was contained by and occurred in the same positions as the third.
Is this any clearer?
Thanks for looking and trying to help,
Jezzica85

Similar Messages

  • Making a phrase counter--word scanning

    Hi everybody,
    I'm writing a phrase counter, and so far it's working, but I'm trying to optimize it because running over a for loop is really slowing me down.
    Here's the problem:
    I want to get phrases that repeat more than once, from length 3 words to 10 words. Each time I change the length of the phrase (say, from 10 to 9 to 8, etc down to 3), I have to run over the entire word list all over again, which eventually amounts to 8 total passes over an ArrayList that's almost 45000 elements long right now, and will get longer.
    An added complication in this is that there are certain identifiers in the word list that mark the beginnings of chapters (#) and sentences ($); any time they are hit, the iterator moves to the next word.
    So, basically, something like...
    example example example example example $ # example example example $
    ...with the repeating loop I have now would give:
    0 phrases of length 10, 9, 8, 7, or 6
    1 of length 5
    2 of length 4
    4 of length 3
    Could anyone give me advice?
    Thanks!
    Jezzica85

    Yes, you've got that right. Thank you, I think I'll try that. I won't be able to come back on and tell if it worked until sometime tomorrow probably, but in any case, thanks, I think this will get me where I need to go with a little tweaking. Come to think of it, this might be really fast, especially if I delete an index once it runs into an identifier. Very cool.
    Thanks again,
    Jezzica85
    PS--Oh, and by the way I see you'll have been registered here for two years soon. Congrats!
    Message was edited by:
    jezzica85

  • Consumption Indicator "V" and follow-on activities

    Hi,
    We are considering using Consumption Posting Indicator = V for sales orders due to a technical issue we have passing data from CRM to ECC.
    I am not sure what V is used for normally and what unwanted processes it may trigger.  Using V, I have been able to run SO's through VL01N GI and 3rd party SO's through procurement with no apparent problems so my quesiton is:
    1.  What is V normally used for
    2.  What issues can I expect creating SO's as V and then doing normal PR/PO activities against these SO's
    Thanks in advance!
    Mike

    Hi,
    We are considering using Consumption Posting Indicator = V for sales orders due to a technical issue we have passing data from CRM to ECC.
    I am not sure what V is used for normally and what unwanted processes it may trigger.  Using V, I have been able to run SO's through VL01N GI and 3rd party SO's through procurement with no apparent problems so my quesiton is:
    1.  What is V normally used for
    2.  What issues can I expect creating SO's as V and then doing normal PR/PO activities against these SO's
    Thanks in advance!
    Mike

  • Sorting ArrayList indices

    I am not sure if this can be done. I randomly add elements to ArrayList and arrange in increasing order, can this be done...
    for example,
    ArrayList<String> tempList = new ArrayList <String>();
    tempList.set(o,"aaa");
    tempList,set(3,"bbb");
    tempList.set(1,"ddd");
    tempList.set(2,"ccc");Then I would like to sort them so that I can print them in order, i.e. element at 0, then 1, then 2, then 3....
    How can I do this?

    I am not sure if this can be done. I randomly add
    elements to ArrayList and arrange in increasing
    order, can this be done...
    for example,
    ArrayList<String> tempList = new ArrayList
    <String>();
    tempList.set(o,"aaa");
    tempList,set(3,"bbb");
    tempList.set(1,"ddd");
    tempList.set(2,"ccc");Then I would like to sort them so that I can print
    them in order, i.e. element at 0, then 1, then 2,
    then 3....
    How can I do this?Something says me that [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#sort(java.util.List)]Collections.sort(List list)&#9733; can help you.
    API Documentation is your friend
    ***

  • How to bind an element in an arrayList to a table column

    Hi everyone, I need your help.
    I have an ObjectListDataProvider to bind a class MyClass to a table. Inside of MyClass, there is a property called dynNumOfElements of type ArrayList. I need dynamically create the columns of the table to match the number of elements in ArrayList, and bind each element in the ArrayList to a column.
    However I dont know how to do it? It is going to be something like createValueBinding("#{currentRow.value(['dynNumOfElements[1]']}"). Obviously this does not work.
    Can you tell me a way to solve this problem?
    Is it possible to bind a column to an element in a collection?
    Thanks in advance

    Thanks Winston,
    Following is what I did. They are all in Page1.jsp
    public String getMyData(){
    // Make sure to check for nulls
    return myList.get(count++).toString();
    private ArrayList myList = new ArrayList();
    private int count = 0;
    public String button3_action() {
    // TODO: Replace with your code
    //initialize list
    myList.add("string 1");
    myList.add("Stirng 2");
    myList.add("string 3");
    TableColumn tc1 = new TableColumn();
    tc1.setId("tc1");
    tc1.setHeaderText("tc1");
    tableRowGroup2.getChildren().add(tc1);
    StaticText st1 = new StaticText();
    st1.setValueBinding("text", getApplication().createValueBinding("#{Page1.myData}"));
    tc1.getChildren().add(st1);
    return null;
    The error message is "Error getting property 'getMyData' from bean of type helloweb.Page1"
    Can you help me to fix the problem? Thanks a lot.

  • The follow up material results in recurssiveness

    HI,
    I have two BOMs one is plant specific production bom
    & the other is group BOM which is engineering/design bom
         Production Bom(plant specific)     
    parent     MO     
    child 1     m1     
    child 2     m2     
         Enginering/desing bom(indepent of plant)     
    parent     MO     
    child 1     m1     
    child 2     m2     
         m3     
    So in material master  of m3  iam trying to discontinue with  discontinuation indicator 1 with follow up material MO
    The sytem is issuing the "the specified followup material results in recurssiveness"
    why the system is throwing this message though m3 is not present in the production bom (which is plant specific)

    Praveen,
    Are you trying to say that if you maintain the material BOM for M0 with M3 as component and a follow up material as M0 again..?
    It will definitely a recursive bom.
    Or is it that you are maintaining a material M3 with follow up material as M0, where the M0 bom has components as m1 and m2 and you are getting this error in this case?
    Please explain clearly..
    Sumeet

  • Final Delivery indicator in Goods Receipt tab in Process Order

    Hello Friends,
    I have one doubt, thought to discuss with you.Whats the importance of Final delivery indicator in Process order.I know that if any further goods receipt is not accepted against the order than we should tick this indicator,because of which system sets the DLV status at order header level or if goods receipt qty against the order is equal to order qty than system automatically sets this indicator.
    when we do the settlement of order than system looks either for TECO or DLV status of order , if its find  there than system consider such orders for settlement.
    Now my question is suppose i have done the Goods Receipt against the order less than the order qty, than system will set the PDLV Status against that order.Now no further goods receipt is  expected against that order.Now i haven't set the Final delivery indicator in goods receipt tab in process order.But i have technically completed the order,because of which system has set the TECO status against that order.
    Will system allow me to settle such order?and viceversa, if order has DLV status at header level and no TECO status, than system will allow to settle such order?If yes than whats the other use of Final Delivery indicator in process order?Is it important to set that indicator from settlement point of view only?
    As far as i know, system allows us to do,but on this issue i have got different answers from different person.So bit confused.
    Thanks and Regards,
    Jitendra Chauhan
    Edited by: jitendra chauhan on May 8, 2009 8:42 AM

    Dear,
    Will system allow me to settle such order?and viceversa, if order has DLV status at header level and no TECO status, than system will allow to settle such order?
    Yes
    If yes than whats the other use of Final Delivery indicator in process order?Is it important to set that indicator from settlement point of view only?
    You need to Final confirm (CNF) the Order to get the DLV Status.
    Or if the Delivery completed indicator is set in the Process Order, then also th System status will be DLV
    If your order quantity10 and you produced 10 quantity it means that order is fully deliver  then Final delivery will automatically be set.
    The "delivery completed" indicator has the following effects:
    o The item is regarded as closed, even if the total quantity was not delivered.
    o A further delivery is not expected, may, however, arrive.
    If status is DLV then it cannot be a WIP stage where the the good are posted to stock and production is completed
    Please refer this thread fro DLV and TECO,
    Re: order settlement
    Regards,
    R.Brahmankar

  • Material staging indicator not populating in prod order WM pick list item

    Hello,
    I have an issue with material staging in an prod order
    1) PP-WM interface is activated
    2) Control cycle for material is created
    3) Production storage location is created for material
    4) storage type is 100 for production
    5) There is one discontinued material and also the follow up material
    6) stock of discontinued material is zero and requirement are passed to follow up material
    When we confirm the order the stagging indicator for both follow up material as well as discontinued material automatically populates zero (Non relevence to pick list items) where as it should be one (1 - for pick list items).
    One more issue user has manually inserted discontinued material as well as follow up material in production order change mode.
    In the BOM of a main material both discontinued as well as follow up material is there with some quantity as a component.
    For the same work center, control cycle , production storage location the indicator is populating.
    These two material (discontinued as well as follow up) are appearing twice in the WM pick list screen where first two line items are OK and populating indicator "1". But in line item last and second last indicator is not there.
    My question is why the stagging indicator is not automatically populating in the production order WM pick list screen in front of components.

    Unfortunately, WM material staging via production orders is not possible
    from the pull list.  Please see the long text of message RMPU 311
    (WM material staging for production order reservation not possible):
    "You cannot carry out a WM material provision for pick parts from
    production order reservations in the pull list". The reasons for this
    are cleary explained in the SAP on-line documentation via the
    following path :
      Logistics -> Logistics Execution -> Warehouse Management Guide ->
      Goods Issue -> Goods Issue for Production Supply ->
      Material Staging for Repetitive Manufacturing
    See the following under the Selection heading :
    The choice of the selection type influences which types of WM material
    staging are supported in the pull list. However, the pick parts can be
    staged via RS headers/planned orders but not with the current BOM
    explosion. The release order parts, on the other hand, can also be
    staged if the current BOM is used for calculating the dependent
    requirements.
    WM material staging via production orders is not possible from the pull
    list.
    I think you may try in CO02 or COR2 for production order or process order.

  • Count space in word

    hi how can i count alphabet in a letter for example if i have word simple how can i write query to show that simple got 5 alphabat and count the space if its there

    It would help if you were clear in what you want. Please read: {message:id=9360002}
    Here's an example of the sort of thing you could do if you wanted...
    SQL> drop table t
      2  /
    Table dropped.
    SQL>
    SQL> create table t as
      2    select 'SUPERCALAFRAJALISTICEXPIALIDOCIOUS' as txt from dual union all
      3    select 'THISISMYVERYLONGNAME' from dual union all
      4    select 'SIMPLE 123' from dual
      5  /
    Table created.
    SQL> with chrpos as (select t.txt, SUBSTR(t.txt,x.rn,1) as chr, x.rn as pos
      2                  from   (select rownum rn from dual,t connect by rownum <= length(t.txt)) x, t)
      3  select txt, chr, cnt, ltrim(sys_connect_by_path(pos,','),',') as positions
      4  from (
      5        select c.txt, c.chr, c.cnt, c2.pos, row_number() over (partition by c.txt, c.chr order by c2.pos) as rn
      6        from (
      7              select c1.txt, c1.chr, count(*) cnt
      8              from chrpos c1
      9              group by txt, chr
    10             ) c,
    11             chrpos c2
    12        where c2.txt = c.txt
    13        and   c2.chr = c.chr
    14       )
    15  where connect_by_isleaf = 1
    16  connect by txt = prior txt and chr = prior chr and rn = prior rn+1
    17  start with rn = 1
    18  order by txt, chr
    19  /
    TXT                                C        CNT POSITIONS
    SIMPLE 123                                    1 7
    SIMPLE 123                         1          1 8
    SIMPLE 123                         2          1 9
    SIMPLE 123                         3          1 10
    SIMPLE 123                         E          1 6
    SIMPLE 123                         I          1 2
    SIMPLE 123                         L          1 5
    SIMPLE 123                         M          1 3
    SIMPLE 123                         P          1 4
    SIMPLE 123                         S          1 1
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS A          5 7,9,12,14,25
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS C          3 6,20,30
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS D          1 28
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS E          2 4,21
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS F          1 10
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS I          5 16,19,24,27,31
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS J          1 13
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS L          3 8,15,26
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS O          2 29,32
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS P          2 3,23
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS R          2 5,11
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS S          3 1,17,34
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS T          1 18
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS U          2 2,33
    SUPERCALAFRAJALISTICEXPIALIDOCIOUS X          1 22
    THISISMYVERYLONGNAME               A          1 18
    THISISMYVERYLONGNAME               E          2 10,20
    THISISMYVERYLONGNAME               G          1 16
    THISISMYVERYLONGNAME               H          1 2
    THISISMYVERYLONGNAME               I          2 3,5
    THISISMYVERYLONGNAME               L          1 13
    THISISMYVERYLONGNAME               M          2 7,19
    THISISMYVERYLONGNAME               N          2 15,17
    THISISMYVERYLONGNAME               O          1 14
    THISISMYVERYLONGNAME               R          1 11
    THISISMYVERYLONGNAME               S          2 4,6
    THISISMYVERYLONGNAME               T          1 1
    THISISMYVERYLONGNAME               V          1 9
    THISISMYVERYLONGNAME               Y          2 8,12
    39 rows selected.Which details each individual character of the string, indicating a count of how many times that character appears in the string, and lists all the positions of that character in the string.

  • Global Counter Variable - Graphical Mapping

    Hi there.
    Can anybody help with implementing a global counter variable in the graphical mapping please.
    I am trying to populate the "SEGMENT" field of an IDoc with the correct sequence, i.e. add 1 for each new segment. The IDoc has several segments, most of which are embedded. I have tried using the "<b>counter</b>" function but this seems to reset back to one for each instance of it being called.
    I would appreciate any pointers.
    Thank you.
    Mick.

    Hi see this for implementation
    <b>defining Global Variables</b>
    ArrayList arrVI;
    int counter =0;
    <b>Initialization Section</b>
    arrVI= new  ArrayList();
    <b>assignment</b>
    arrVI.add(sVI[iLoopCounter]);
    counter++;
    <b>
    fetch Values</b>
    for (int i =0;i<counter;i++)
    result.addValue(arrVI.get(i)+"");
    Mudit

  • Missed Call Indicator....wont go away!

    my phone froze 1 day as my husband was calling. Well his ringtone wnet off but the call never came up so that i could answer it, the whole thing froze and I had to restart it by taking out the battery.. Ever since I cannot get the 1 Missed Call indicator to go away. Ive restarted many times, Checked the call logs, it just wont go away....
    anyone else have any suggustions?
    thanks

    To clear the Misse Call Indicator complete the following steps:
    Connect the BlackBerry smartphone to the computer.
    Open BlackBerry Desktop Manager.
    Double-click Backup and Restore, then click Advanced.
    From the list of Device Databases, select the appropriate database.  For your problem, select Call Log.
    Click Clear.
    In the Warning window, click OK.
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • APO Bapi - ERROR - No entry found in transportation indicator table for fol

    Hi
    Experts .. need help on a APO bapi
    Iam being doing BAPI for transportation lane to add new material through the bapi BAPI_TRLSRVAPS_SAVEMULTI
    iam passing  the following to BAPI
        Logical system
        model
    and in tables .
        TRANSPORT_LANE
        TRANSPORT_LANEX
        PROD_PROCUREMENT
        PROD_PROCUREMENTX
        LOCATION_FROM    = '1010'.
        LOCTYPE_LOC_FROM = '1001'.   
        LOCATION_TO =   '1101'.
        LOCTYPE_LOC_TO =  '1001'.
    the above data is common for passing all the four bapi tables and in
    addition iam passing
    prod-valfr =  Converted value by passing to FM - IB_CONVERT_INTO_TIMESTAMP.
    prod-valto =  Converted value by passing to FM - IB_CONVERT_INTO_TIMESTAMP.
    prod-product = material number.
    AFter excuteing bapi iam getting an error
    No entry found in transportation indicator table for following objects
    the above error occured when passed the given data to bapi table -  PROD_PROCUREMENT  
    if we pass the data to   PROD_PROCUREMENT and   PROD_PROCUREMENTX
    then there is no error in  table return of bapi but the data is not uploaded in transportation lane.
    I will really appreciate if some guide me where iam wrong or some other solution for this .
    Regards .
    Thanks .

    Hi,
    I am writing bdc code for uploading changing inspection plan data using qp02 . I saw your post in sdn .I think you have solution .can you tell the solution .
    Regards
    Nandan.

  • How to restart a number counter?

    So I have this number counter. In it's indicator it counts up by 1 every second. It works fine. But at around 32 I want it to start back at 0. Right now it justs keeps counting up for forever. Any idea how to do this? Every option I've tried to implement has not worked and been way more complex than I think it should be.

    Hi Orta,
    you should alway attach your VI to get comments on improvements or solutions to your question…
    When you don't know about a basic modulo math operation you should be able to implement some pseudocode like this:
    counter++
    IF counter >= limit THEN
    counter:=0
    ENDIF
    (Compared to modulo operation it's slightly "Rube-Goldberg"ish… )
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Del completed Indicator

    Is there any use of delivery completed indicator.
    In MIGO del completed field is greyed. How can I change it?
    Can anyone detaila scenario which really required the need of Delivey completed indicator?
    regards
    VS

    Dear VS,
    Defaulting Delivery Completed indicator:
    Materials Management -> Inventory management and Physical Inventory -> Goods Receipt -> Set Delivery Completed Indicatory.
    The 'delivery complete' indicator specifies whether a purchase order item is considered closed.
    This means that no more goods receipts are EXPECTED for this item.
    If the delivery complete indicator is set, the open purchase order quantity becomes zero, even if the full quantity has not been delivered.
    It is still possible to post goods receipts of remaining quantities, but these no longer change the open purchase order quantity.
    the delivery completed indicator for goods receipts if the delivered quantity lies within the under/overdelivery tolerance.                 
                                                             The "delivery completed" indicator has the following effects:          
    o   The item is regarded as closed, even if the total quantity was not delivered.           
    o   A further delivery is not expected, may, however, arrive.          
    o   In the next goods receipt, the item appears on the selection list but has no selection indicator.
    o   The item can be reorganized even if the total quantity has not been delivered.  
    Note:                                                    Even if the "delivery completed" indicator has not been set, an item is considered closed once the total quantity has been delivered. This means that the "delivery completed" indicator is not necessary in this case. 
    Hope this will help.
    Regards,
    Naveen.

  • JSTL unable to retieve class of ArrayList

    Let's say that i add an attribute in the request scope like this :
    request.setAttribute("myList", new ArrayList());
    Why does the following code crashes?
    <c:out value="${requestScope.myList.class.name}"/>
    When the following doesn't :
    <%= request.getAttribute("myList").getClass().getName() %>

    Its not a bug, its a FEATURE! This is defined
    functionality: JSTL is being helpful :-)Sorry but i don't understand how helpul that is. We could use backets to access elements in the list : ${myList[0]}. I thought period were reserved for accessing properties the "bean way". That forces the developer to handle exceptions when he writes generic code.
    ie myList.0 would retrieve the first element in the
    list.Well i tried this but it's not working either :
    <c:out value="${myList.0}" /> generates the following error
    javax.servlet.jsp.el.ELException: Encountered ".0", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", "?"]
    When you use ${myList.class} it tries to turn
    "class" into an integer, fails miserably and throws
    an error.Indeed it does :-(
    So any idea how i could retrieve the className of all objects placed in requestScope without having to handle exception ??

Maybe you are looking for

  • Printout a pdf file in a specific printer.

    Hi experts, I am facing the following problem: I have a PDF file that i want to print without using a user interface to do it. I created a database table where I store the name of the PDF file that I need to print, the type is BDS_FILENA. Now at a ce

  • Is it possible to duplicate a button, instead of building a new one each time (navigation)

    In CS5... I have created a movieclip button which is animated  for all the states I need (up, over, out, etc.) it's made up of text, which is in a movie clip where I have my animations created (actions layer with AS3 script, my txt movieclip layer, m

  • Odd Wireless Activity G5 iMac

    Hey everyone, I have noticed a few problems with my mac book pro and my imac. It's mainly to do with my wireless connection cutting me off and re-connecting. I'm not sure if anyone else has run into this problems but I am running a wireless network v

  • How to run a VB macros code on Query refresh?

    Hi BW gurus, Please help me out with this task. I have a macros as below <b>Sub Table_To_Cons()     'Copy the occupied rows     Application.DisplayAlerts = False     TargetSheet = ActiveSheet.Name     Sheets("Table").Activate     j = 2     For i = 21

  • Enhancement Exit EXIT_SAPLV56L_002

    Hello everyone, I am trying to update the code inside the exit EXIT_SAPLV56L_002 via an include program inside it (ZXV56U25). The problem is, the code we inserted inside is not executed. This exit is already activated. I viewed it's documentation and