Re: Reading directory in JSP file (Struts 1.3)

2008-08-29 Thread nabbler12999
Thanks, I see. nabbler12999 wrote: > > Hello, > > I want to read a directory. But canRead() gives false. How can I do it? > > My code: > [code] > <% > String filename=""; > File dir = new File("files"); > > String[] children = dir.list(); > > if (children == null) { > System.out.printl

Re: Reading directory in JSP file (Struts 1.3)

2008-08-28 Thread Laurie Harper
nabbler12999 wrote: Hello, I want to read a directory. But canRead() gives false. How can I do it? Firstly, you show this code as a scriptlet; while you certainly can do this sort of thing from a JSP, such logic really belongs in your action. That asside: My code: [code] <% String filenam

Reading directory in JSP file (Struts 1.3)

2008-08-26 Thread nabbler12999
Hello, I want to read a directory. But canRead() gives false. How can I do it? My code: [code] <% String filename=""; File dir = new File("files"); String[] children = dir.list(); if (children == null) { System.out.println("ERROR\t can read:"+dir.canRead()); // Either dir does not e