How to get the folder structure using Sevlets

Hi....
I have to retrieve the directory structure on the server and display it
to the user. Once the user selects a folder from the tree, the files
have to load on a different pane. Of course the folder structure could
change on the server if any folder or file is added. In short, i have
to get something like the windows file explorer.Also I need to get the path to a particular folder in the server. Is it possible to do
this with using servlets. If we can do this using
servlets, how can i retrieve the folder structure and send it to the
user interface?
Can somebody help me to do this please.....
Thanks!

I need to get the path to a particular folder in the
server. Is it possible to do
this with using servlets.You can use:
String thePath = getServletContext().getRealPath("/WEB-INF/someDir/somefile");
If we can do this using
servlets, how can i retrieve the folder structure and
send it to the
user interface?You could try using a File object and its method listFiles() or some of its other methods.

Similar Messages

  • The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    The updated iPhoto program is cumbersome.  I am trying to create a Christmas card and can't figure out how to get the fold of the card on the left and not on the top of the card.  I had no trouble with this for the past two years.  Can someone help?

    Click on the Layout button lower right and choose a Vertical lyout from the dropdown

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to get the list of Used Quotations & Non Used Quotations

    Hi MM Gurus,
    How to get the list of Used Quotations & Non Used Quotations.
    i am not talking about Open quotation ,closed quotation..
    if once i created PO through quotation it should be used quotation. i not created PO through quotation
    it s should be Non used quotation. how to get this list through when we create PO  through ME21N
    document over view. is there any opetion in Dynamic selection or somthing ..???
    Thanks in Advance..
    Anthyodaya.

    ok.

  • How to get the folder ID of SAP Inox folder

    Hi
    I want to access the document(mail) which is there in one of the shared folders of SAP inbox through program.
    Can anyone suggest me, how to get the folder ID?

    Hi,
    Try the FM SO_FOLDER_ROOT_ID_GET for your requirement.
    Hope it will help you in hetting the folder ID.
    Best Regards,
    Deepa Kulkarni

  • How to get the organization structures of a compnay code (BUKRS)?

    Hi Friends,
    I have a requirement to get the organization structures of a compnay code (BUKRS), such as Controlling area, Credit control area, Plant, Sales Organization, Purch. Organization, Personnel area.
    How can I get them, I only know the compnay code table is T001, but how to get the organization structures  of a compnay code (BUKRS) into a internal table?
    Thanks a lot!

    Hi,
    A lot of table will be involved for the same.
    The company code is the highest unit and all other things are assigned to it.
    Check the settings in SPRO as to how the maintainance is done.
    From here you will get the maintainance view details if you do F1 help on each field.
    From this view you can get the relevant tables.
    For eg.
    Go to SPRO>Controlling>Organization-->Maintain Controlling Area
    Here you will find the assignment of controlling area to the company code.
    The maintainance view is V_TKA02 and the tables involved are TKA02, TKA01, T001
    In this way you can find the relevant tables.
    Regards,
    Ankur Parab

  • How to get the computer name using C#?

    Hi all,
    Does anyone know how to get the computer name using c#?
    Thanks

    Try this, string computer_name = System.Environment.GetEnvironmentVariable("COMPUTERNAME");
    Naren.

  • How to get the folder name of selected subitem in tree structure?

    Hi All,
               I created a tree structure like below.
             ->Folder1-- 1
                              2
                              3
            ->Folder2-----1
                               2
                               3
                    i.e i have two folders & each folder having the values like above.Now i want to perform some action by clicking on the any of the values.Suppose if i click value 2,i want to do some action.the actions need to perform is varies from floder to to folder.
            So How can i get the folder name of clicked Value?
    Regards,
    Ravi

    Hi Kumar ,
    the below code should help you.
    Register the below action for the leaf node for which u need the subfolder's name above it.
    Worked fine in my system ...hope it does in ur scenario too
    method ONACTIONGET_PATH .
      data : lr_element TYPE REF TO if_wd_context_element,
             lr_node TYPE REF TO if_wd_context_node,
             ls_path type string,
             ls_path_node TYPE string,
             lt_string type TABLE OF string,
             l_lines type i,
             l_lines_1 TYPE i.
      lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
    **-> getting the path of the node/leaf
    *which  u had clicked and from that getting the node above it
      ls_path = lr_element->get_path( ).
      SPLIT ls_path at '.' into table lt_string.
    -> remove the first 2 entries as they will contain the view name
      DELETE lt_string FROM 1 to 2.
      l_lines = LINES( lt_String ).
      l_lines_1 = l_lines - 1.
    -> remove the last 2 entries as they will contain the element in the path
      DELETE lt_string  from l_lines_1 to l_lines.
      LOOP AT lt_string into ls_path.
        CONCATENATE LINES OF LT_STRING into ls_path_node SEPARATED BY '.'.
      ENDLOOP.
    **-> getting access to the node above the leaf element
    LR_NODE = WD_CONTEXT->PATH_GET_NODE( path = ls_path_node ).
    lr_element = lr_node->get_element( ).
    **-> Getting the name of the folder...
    *here path is the attribute in my context which stores the name of the folder
    lr_element->get_attribute( EXPORTING name = 'PATH' IMPORTING value = ls_path ).
    endmethod.

  • How can  change the folder structure in Bex Analyser to match the Web

    Hi Experts,
    When I create a report using the Web Analyser and save it in My Portfolio or Bex Portfolio, I can't find the report (or folders) in Bex Analyser.
    How Can i change the folder structure in Bex Analyser to match the Web Analyser?

    Hi Reddy,
           As u have created reports and saved it in BEx portfolio or My portfolio it will be saved in the KM folder which is known as Knowledge management folder for the KM services such as feedback,rating etc.So u cant view them when u open in web analyzer.U can only see them when u save in favourites or the roles folders.
                              Hope this helps
                         Sunil Reddy

  • How to get the NameTab Structure(X031L) for Dynamic internal table?

    when we pass standard table to the FM 'DD_GET_NAMETAB' we will get the
    nametab structure(x031l), like this i want to get the same structure for
    dynamic internal  table . how can I achieve this
    please help me...

    Hi,
    try this method
    REPORT zmaschl_create_data_dynamic .
    TYPE-POOLS: slis.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          is_fcat LIKE LINE OF it_fcat.
    DATA: it_fieldcat TYPE lvc_t_fcat,
          is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: new_table TYPE REF TO data.
    DATA: new_line  TYPE REF TO data.
    FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
                   <l_line>  TYPE ANY,
                   <l_field> TYPE ANY.
    Build fieldcat
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'       EXPORTING           i_structure_name = 'SYST'       CHANGING           ct_fieldcat      = it_fcat[].   LOOP AT it_fcat INTO is_fcat WHERE NOT reptext_ddic IS initial.        MOVE-CORRESPONDING is_fcat TO is_fieldcat.        is_fieldcat-fieldname = is_fcat-fieldname.        is_fieldcat-ref_field = is_fcat-fieldname.        is_fieldcat-ref_table = is_fcat-ref_tabname.        APPEND is_fieldcat TO it_fieldcat.   ENDLOOP.
    Create a new Table
    CALL METHOD cl_alv_table_create=>create_dynamic_table       EXPORTING        it_fieldcatalog = it_fieldcat       IMPORTING        ep_table        = new_table.
    Create a new Line with the same structure of the table.
    ASSIGN new_table->* TO <l_table>.CREATE DATA new_line LIKE LINE OF <l_table>.ASSIGN new_line->* TO <l_line>.
    Test it...
       DO 30 TIMES.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          <l_field> = sy-index.
          INSERT <l_line> INTO TABLE <l_table>.
       ENDDO.
       LOOP AT <l_table> ASSIGNING <l_line>.
          ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
          WRITE <l_field>.
       ENDLOOP.

  • How to get the directory name using vnode address

    All,
    I am writing a C program and need info on the following:
    1. I have got the vnode address of the current directory. my question is "How to get the inode information (in particular, directory name) from the vnode address ?". What calls i need to use in order to get the info ?
    2. Any helpful web sites containing the above information ?
    Thanks in advance

    package x.y;
    import java.io.File;
    public class Test {
        public static void main(String[] args) {
            System.out.println(new File(Test.class.getResource("").getFile()).getAbsolutePath());
    }

  • How to get the best results using the refine edge tool?

    how to use the sliders in the refine edge tool? how do you get the best results using the fine edge tool?

    You should ask in the forum for the (un-named) program you are using
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Is there any way to maintain the folder structure using the audio converter

    hi, please, i need help
    I want to convert some 24 bit wav files into 24 bit Apple Lossless files.
    dBpoweramp converter doesn't allow 24 bit files for Apple Lossless
    iTunes doesn't keep the folder structure, is there any option to change that?
    thanks

    When iTunes does a format conversion, it stores the new file in an Album folder within an Artist folder. It does not matter where the original file is. It does not provide any other option.

  • To get the tree structure using html

    how to get tree structure using html?is there any commands in html to get the tree structure

    This is a Java forum, not HTML.

  • How to get the forma name  using the Spool number

    Hi all,
    Please tell me how to find the Script name or Smartform name using the SPOOL NUMBER
    Regards
    Ajay

    Hi Ajay,
    you could use the FM 'SSF_FUNCTION_MODULE_NAME' inorder to get the Smart Form Function Module name by giving the name of the form.
    Reward points if this helps,
    Kiran

Maybe you are looking for

  • E72 - Possible to have more than 2 email accounts ...

    E72 So is it possible to have more than 2 email accounts shown at the home screen? Currently one is set as primary and the other as secondary.. I have 4 email addresses I want shown at the main screen.. Please help.

  • Updates is unavailable for my ID, but i only have one ID.

    I just found a problem today that i am unable to update my apps. It told me that "This update is not available for this Apple ID either because it was bought by a different user or the item was refunded of cancelled' ~ Both iphone and ipad. I am sure

  • Embedding external links in FC?

    Hi all, I was wonder if it's possible to embed external links such as Vimeo in Flash Catalyst. If so, I'd love to know how. If not..why not? Thanks, -Eva

  • Allowing third party cookies on safari

    I just got my Mac and upgrades my OS to Yosemite. I haven't had to use the website before i downloaded Yosemite so I don't think it has to do with that. I can't find anything about cookies in my settings. My OS is 10.0, don't know about the IOS

  • How can i rid out the pops up in safari?

    when ever i open the safari page all ad pops up and distract me. and these is new to me.