Results 1 to 6 of 6

Thread: Dynamic Linked List In Jsp

  1. #1
    Join Date
    Nov 2009
    Posts
    652

    Dynamic Linked List In Jsp

    Hello, I am learning java programming language. And while learning it I have come across the creating a dynamic linked list in jsp. I am not able to get the concept behind it. If anyone from you know the details about it, then please explain about it to me. I will be thankful to you.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Dynamic Linked List In Jsp

    Hey, you can simply make use of the following code for creating dynamic dropdown list. I am not having knowledge of jsp, so you can simply use logic behind it:
    Code:
    function dynamictree($rootempid,$level)
    {
    $sql="select empid,emp_name
    from tbl_name
    where deptid=$rootempid
    order by emp_name";
    
    $result=mysql_query($sql);
    
    while (list($DBempid,$dbempname)=mysql_fetch_row($result))
    {
          $width=($level+1)*24;
     
          if ($width==48)
            $display="    ";
           
          if ($width==72)
            $display="      ";
    if ($DBempid==1)
    {
    $display.="<option value=$DBempid>";
    }
    else
    {
    $display.="<option value=$DBempid>";
    }
    $display.="$dbempname</option>";
    echo $display;
    dynamictree($DBempid,$level+1);
    }
    }
    ?>
    
    <table cellpadding="2" cellspacing="2" border="0" width="width="100%"">
    <tr>
    <td><select name="">
    
    <? dynamictree(0,0);?>
    
    </select></td>
    </tr>
    </table>

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Dynamic Linked List In Jsp

    Hey, If I want to create a linked list in c, then I will create it as below:
    Code:
    struct testing
    {
            char str [40];
            char str1 [40];
            char str2 [100];
            char str3 [6]; 
            char str4 [10];
           
            struct testing *pNext; 
    };
    struct testing *connect = NULL;
    
    printf ("%s", *(connect + 6) -> num1);

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: Dynamic Linked List In Jsp

    Hello, it depends on you which type of link list to be use. If you want to use the standard Linked list, then you are not able to get the solution for using the arbitrary elements. You need to start the heap and then iterate it to the number of times which you want. But, if you create an array of pointers to the nodes of your list and then you can able to get the elements in that way. This will be useful in the case where you will simply use the pointers list for your list which are not used by the accessing the list, but it is used to show the specific order of the list.

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Dynamic Linked List In Jsp

    Hello, just make use of the code below :
    Code:
    struct linklist
    {
    pre object(instance) for this Type */
    linklist *pre;
    wchar_tuser[50];
    object(instance) for this Type */
    linklist *next;
    }

  6. #6
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Dynamic Linked List In Jsp

    Hello, I have search this on internet but I don't find solution for it, so I think you need to use the books below for getting the solution for it:
    • Core Servlets and JSP
    • Java Servlet & JSP Cookbook
    • Mastering Enterprise JavaBeans Third Edition
    • The Professional JSP Book
    • Beginning JSP 2: From Novice to Professional

Similar Threads

  1. Problem with Java linked list
    By XeroX in forum Software Development
    Replies: 1
    Last Post: 13-06-2012, 03:37 PM
  2. Joomla Linked up files no able to list
    By Jahnavi6 in forum Technology & Internet
    Replies: 4
    Last Post: 15-07-2010, 02:39 AM
  3. Problem using Linked list in java
    By Aaliya Seth in forum Software Development
    Replies: 5
    Last Post: 18-02-2010, 01:06 AM
  4. Better way to sort a linked list in c++
    By Juany in forum Software Development
    Replies: 5
    Last Post: 13-02-2010, 04:30 PM
  5. What is a linked list?
    By Migueel in forum Software Development
    Replies: 5
    Last Post: 28-11-2009, 11:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,490,180.51645 seconds with 17 queries