How to display a folder with files in an apex page

Hi,
Is there a way to display a folder with the files uploaded by me and also i should be able to add new folder in the page.Is it possible???
Thanks in Advance,
Balaji.

<%
     File fParent=new File(getServletContext().getRealPath("/~tolmank/hsql"));
     File[] myDBFiles=fParent.listFiles();
     String name="";
     String fSize="";
     String lastM="";
     %>
<table width="50%" border="0">
<tr bordercolor="#000000" bgcolor="#CCCCCC">
<td width="36%" align="center">FILE</td>
<td width="30%" align="center">SIZE(kb)</td>
<td width="34%" align="center">LAST MODIFIED </td>
</tr>
<%
     for(int i=0;i<myDBFiles.length;i++){
          name=myDBFiles.getName();
          fSize=(myDBFiles[i].length()/1024)+"kb";
          SimpleDateFormat sdf=new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z" );
          Date lastD=new Date(myDBFiles[i].lastModified());
          lastM= sdf.format(lastD);
%>
          <tr>
               <td align="center"><%=name%></td>
               <td align="center"><%=fSize%></td>
               <td align="center"><%=lastM%></td>
          </tr>
<%
%>
</table>

Similar Messages

  • How to copy folder with files and subfolders within it  to another folder

    how to copy a folder with files and subfolders within it to another folder

    http://javaalmanac.com/egs/java.io/CopyDir.html?l=new

  • My macbook pro displays a folder with a question mark on it when it turns on. What does this mean and how do I fix it?

    My macbook pro displays a folder with a question mark and won't open. What does this mean and how can I fix it?

    it means your HD and the software can't find each other, the following article tells how to troubleshoot this issue:
    https://support.apple.com/kb/TS1440
    hopefully you have backup of your data since sometimes this means the HD is crashing.
    if the article doesn't resolve the issue i would take the mac to apple store or service provider and have it looked at, the following link tells how to find one close to you:
    https://locate.apple.com
    good luck!!

  • How to share a folder with ipad or iphone trough win7 ?

    Good day, please help to know,How to share a folder with ipad or iphone trough win7 ?  I have two PC ( win 7) and work with iPad and iPhone at the same time and always  i need to transfer file or documents to iPad (iPhone ) and also transfer from iPad( iPhone) to PC(win7) , already i have used some share wifi app that have to used ip address like 192.168.5.2:8888 that i am not really like this way actually i need a way or app to share a folder from my PC to iPad and iPhone.
    And also how can i look my iphone or ipad in network of PC?
    Many thanks

    I know of apps that can access shares and download but I am not aware of any apps that will allow you to upload as well.

  • How to display library folder permanently in mountain lion

    How to display library folder pemanently in Mountain Lion 10.8.2

    On OS X Lion and Mountain Lion, ~/Library is hidden. If you want to show it always on Finder, open Terminal and type: chflags nohidden ~/Library
    After typing that, the Library folder will appear on the user folder, on Finder. Apart, Apple has released OS X 10.8.3 with new features and fixes, so open Software Update and install the OS X update

  • How to lock a folder with password ?

    Please tell me how to lock a folder with password (to keep personal files)

    Keep looking it can be done. I have a folder on my hard drive that requires a password everytime I try to open it. I found how to do this in an old "Mac OS - The missing manual" but don't remember off the top of my head how I did it. I remember you have to partition a portion of the hard drive, I think I did like 10 Gig of my 1 Teribite external drive and then you give it a name and make up a password. The password is NOT changeable and if you lose it you can't get back in that folder. It appears as a standard folder but needs a password to open it.
    Email me direct if you can't find any info and I will try to look it up - [email protected]

  • Upload Entire Folder with Files to Web Page

    Can someone please inform me how to upload a Folder with multiple files in the folder. We have many many files that we need to have viewed on the outside but don't want to have to link every single file. I am using CS5.
    Thank you!

    Hello-
    I did exactly what you said. I created the folder on the local and the local and remote folder do match. I created the link and uploaded everything. When I click on the link I receive an error message "HTTP 403 Forbidden". Can you please tell me what this means, what I may be doing wrong. Does this mean that directory browsing is disabled? How do you use a server side script that dynamically reads the file system and creates links?
    Thank you!
    The website declined to show this webpage
    HTTP 403
    Most likely causes:
    This website requires you to log in.
    What you can try:
    Go back to the previous page.

  • How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • Copy folder with files in structured format

    All Experts,
    I am new to indesign and javascripting. i need to copy the folder with files (structured folder) from one location to another location with the same folder name. i tried the file copy file.copy(), this is copying only particular file, i need to copy the folder with structured format. ie folder, if any sub folder...
    Thanks,
    sag

    Sorry for the delay in response.
    I assume both sagkrish and Mac_06 are either the same person or working together?
    When you said:
    when we execute your code it's showing error "cannot compile the script".
    were you trying after fixing the missing double-quote (my post of 1:42am)?
    If not, maybe one of the Windows folks could better advise. The official Microsoft help for XCOPY is http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx? mfr=true that might be differently helpful than Jongware's link, which is good, too.
    I can't quite tell if you're having a problem if you run the XCOPY command from the CMD.EXE Windows Command Prompt. If you are, well, it's not really an InDesign scripting question, but maybe we can help you anyhow. But you'll need to give us a lot more specifics on what is breaking. Does it work with other directories? Are there network filesystems involved? Are the source and destination directories outside of the running user's home folder?
    If you're having problems overwriting files, you might try adding /R.
    (Does anybody else want to test it?)

  • How to display polygons both with line contour and filled interior?

    How to display polygons both with line contour and filled interior?
    Java3D 1.3, Java 1.4.1-rc

    Hi,
    I just started with Java3D last week.
    I assume you mean drawing polygons with outlines (wireframe) in one color and polygon face filling with another color. If so, I've got the same question! (I usually think of "contour" to refers to plotting surface intensity of independent data like temperature or elevation, but I don't think you mean this.)
    The only solution I've found so far is to make two shapes with the same geometry.
    Here's an example - an outlined and filled cube. I made it using a generalize class DualShape which is two shapes with the same geometry, but one filled and one as a line.
    It works, although I can't say I understand the setPolygonOffset(), knowing what value to set. Without the command, the depthbuffer can't consistently decide which should be in front between the fills and lines so it looks bad.
    I certainly think it would be nicer to do both internally, like:
    pa.setPolygonMode(pa.POLYGON_LINE || pa.POLYGON_FILL);
    And then have setFillColor and setLineColor for each.
    I don't know why they don't allow this - maybe OpenGL can't do it like this so Java3D follows.
    If anyone has any better ideas I'd like to hear about it.
    Tom Ruen
    class DualCube extends DualShape // cube with outline and fill colors
    public DualCube(float ax, float ay, float az, //cube lower corner
    float bx, float by, float bz, //cube upper corner
    float br, float bg, float bb, //border color
    float fr, float fg, float fb) //fill color
    setGeometry(new CubeGeometry(ax,ay,az,bx,by,bz),br,bg,bb,fr,fg,fb);
    class DualShape extends BranchGroup //general shape with outline and fill colors
    Appearance ap1,ap2;
    PolygonAttributes pa1,pa2;
    ColoringAttributes ca1,ca2;
    Shape3D s1,s2;
    public void setGeometry(Geometry geo, float br, float bg, float bb, float fr, float fg, float fb)
    //filled shape:
    addChild(s1=new Shape3D(geo, ap1=new Appearance()));
    ap1.setPolygonAttributes(pa1=new PolygonAttributes()); pa1.setPolygonMode(pa1.POLYGON_FILL);
    ap1.setColoringAttributes(ca1=new ColoringAttributes()); ca1.setColor(fr,fg,fb);
    //lined (wire) shape:
    addChild(s2=new Shape3D(geo, ap2=new Appearance()));
    ap2.setPolygonAttributes(pa2=new PolygonAttributes()); pa2.setPolygonMode(pa2.POLYGON_LINE);
    ap2.setColoringAttributes(ca2=new ColoringAttributes()); ca2.setColor(br,bg,bb);
    pa2.setPolygonOffset(-1000); //Uncertain what "float" value to use!
    class CubeGeometry extends IndexedQuadArray //cube geometry data
    private static final int[] faces =
    0,3,2,1,
    0,1,5,4,
    1,2,6,5,
    2,3,7,6,
    3,0,4,7,
    4,5,6,7
    private static float[] verts = new float[24];
    public CubeGeometry(float ax, float ay, float az, //lower limit
    float bx, float by, float bz) //upper limit
    super(8, IndexedQuadArray.COORDINATES , 24);
    int n;
    n=0; verts[n]=ax; verts[n+1]=ay; verts[n+2]=az;
    n=3; verts[n]=bx; verts[n+1]=ay; verts[n+2]=az;
    n=6; verts[n]=bx; verts[n+1]=by; verts[n+2]=az;
    n=9; verts[n]=ax; verts[n+1]=by; verts[n+2]=az;
    n=12; verts[n]=ax; verts[n+1]=ay; verts[n+2]=bz;
    n=15; verts[n]=bx; verts[n+1]=ay; verts[n+2]=bz;
    n=18; verts[n]=bx; verts[n+1]=by; verts[n+2]=bz;
    n=21; verts[n]=ax; verts[n+1]=by; verts[n+2]=bz;
    setCoordinates(0, verts);
    setCoordinateIndices(0, faces);

  • HT1366 How to fix Flashing Folder with Question Mark on Mac

    How to fix Flashing Folder with Question Mark on Mac

    RichardEL is probably correct.  I’ll go through your questions.
    > there is no Mac OS partition, I assume it would be directly underneath the HD on the left?
    I have not seen this particular condition where the hardware disk icon appears but the system volume that is supposed to be below it does not.  The System Disk partition would be below the HD icon indented to the right.  It is usually called “Macintosh HD” unless you renamed it.
    > when I go into disk utility my HD appears on the left, but I can repair or verify it
    Odd.  It appears but you cannot manipulate it with Disk Utility.
    > The S.M.A.R.T status reads verified
    If it did not say Verified then it would indicate a problem.  Saying Verified does not rule out problems but I think it indicates it is still breathing.
    > Is the HD deceased?
    If you booted the Recovery Partition (Boot, Command-R), which it sounds like you did, then at least part of the disk is still breathing.  If it took a long time to boot then that may have been a Network Recovery boot which would indicate the disk is very sick or dead.
    >  [If I] restore from time machine [will] everything will be back as it was before?
    Yes.  That is the beauty of Time Machine.  All your data, applications, and system preferences will be as they were as of the last backup.
    > I was thinking of erasing the HD, would this be of any help or do I just need a new one?
    Given what you reported from the Disk Utility steps you took it is unclear to me if there will be a way to repair the current volume, if you can erase and install from scratch or if you need a new disk.  Before proceeding it may be useful to have an expert at an Apple store look at it for you.  They may be able to revive it without a clean install or new disk.
    As was the case above, it could be a good disk with a bad cable in which case a new disk is not going to help.  To test this you can purchase an inexpensive external enclosure, remove the internal disk, place it in the enclosure, plug it in and then use Boot-Option to attempt to boot from the now external disk.  Here are links to the screwdrivers and enclosure you would need.
    $5 Toolkit: http://eshop.macsales.com/item/OWC/TOOLKITMHD/
    $22 USB 3.0 enclosure: http://eshop.macsales.com/item/OWC/ES2.5BU3W/
    If you attempt a clean install, use the Partition tab to repartition the disk, selecting one partition and with “Options…” electing a GUID partition.  Then use the Erase tab, select “Security Options…” and set it to write a single pass of zeros.  This will write to every sector to map out bad blocks.  (If you have an SSD do not write a pass of zeros.)
    If you do need to replace it I recommend an new inexpensive (~$100) and super-fast hybrid SSHD drive that has an 8 GB SSD cache that makes the data fly.  Google “Seagate 1 TB hybrid SSHD”.

  • How can I merge folder with the same name so that the content does not replace the other

    How can I merge folder with the same name so that the content does not replace the other?

    >
    That's only a good idea if the semantics of sayHello
    as defined in MyInterface suggest that a
    RemoteException could occur. If not, then you're
    designing the interface to suit the way the
    implementing classes will be written, which smells.
    :-)But in practice you can't make a call which can be handled either remotely or locally without, at some point, dealing with the RemoteException.
    Therefore either RemoteException must be part of the interface or (an this is probably more satisfactory) you don't use the remote interface directly, but MyInterface is implemented by a wrapper class which deals with the exception.

  • How to display a cursor with sand glass ?

    I would like to know how to display a cursor with sand glass I am performing a long operation ?
    Thanks in advance.

    As long as you are using anything that extends Component...
    this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    doLongOperation();
    this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));Hope this helps,
    Radish21
    PS the API is ALWAYS your friend
    http://java.sun.com/j2se/1.4.1/docs/api/
    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Cursor.html

  • My iPod Classic has started to display a folder with an explanation mark on it-no tunes! Is there an easy fix?

    My iPod Classic has started to display a folder with an explanation mark on it-no tunes! Is there an easy fix?

    Exclamation mark!

  • My ipod displays a folder with an exclamation point

    well my ipod displays a folder with an exclamation point and it says "go to apple.com/support/ipod" and i went there and nothing it said helped me out....and to top all that off my ipod is making a wierd noise....does anyone know anyhting i can do?
      Windows XP  

    Try the troubleshooting steps set out on this page: "iPod shows a folder icon with exclamation point when you turn it on" http://docs.info.apple.com/article.html?artnum=61003
    If they don't work and it continues to make strange noises then return it as it is probably a more serious fault than you can fix youirself

Maybe you are looking for

  • Disk Utility, Verify Disk & Repair Disk unavailable

    Hi there! I want to check my Hard Disk with Disk Utility, but none of the two buttons (Verify Disk & Repair Disk) are available, I started up from my Mac OS X installation disc, and once, it told me that the disk had errors and needed to backup my fi

  • Images appear as question marks

    I need help! I just uploaded my first dreamweaver website to yahoo. My images appear as question marks. I've uploaded the images in file manager along with the index.html. The site looks fine when I preview in all browsers from dreamweaver. The files

  • SWF Doesn't Display

    I'm redesigning a site with a SWF movie on the home page but the SWF doesn't display on the redesigned page. Original page displays fine. Same results on IE 7 & 8 and FF - that seems to rule out computer & browser errors. The only difference I see is

  • How to run a MS Access Query from Servlet

    Is there a way to execute an MS Access query from a servlet. I have a query that is doing an INSERT into the database. I tried to code the servlet to directly do the query itself, but it keeps locking the database and hanging. I would appreciate any

  • Restrict Material Group Access when creating a PO

    Folks- I have a scenario where in different material groups are created for different levels Ex: Machinery - 1500 Machinery-Warehouse 150010 Machinery Warehouse Exteriors 15001010 If I want to restrict the buyer to use only level 3(15001010) of the m